Class ListCollectionFilter<T>

java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractConsumerStage<T>
kieker.analysis.util.debug.ListCollectionFilter<T>
Type Parameters:
T - The type of the list.

public class ListCollectionFilter<T>
extends teetime.framework.AbstractConsumerStage<T>
This filter collects the incoming objects in a simple synchronized list. It is mostly used for test purposes.
Since:
1.6
Author:
Nils Christian Ehmke, Jan Waller, Bjoern Weissenfels
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  ListCollectionFilter.ListFullBehavior
    An enum for all possible list full behaviors.
  • Field Summary

    Fields inherited from class teetime.framework.AbstractConsumerStage

    inputPort

    Fields inherited from class teetime.framework.AbstractStage

    logger
  • Constructor Summary

    Constructors 
    Constructor Description
    ListCollectionFilter​(int maxNumberOfEntries, ListCollectionFilter.ListFullBehavior listFullBehavior)
    Creates a new instance of this class using the given parameters.
  • Method Summary

    Modifier and Type Method Description
    void clear()
    Clears the list.
    protected void execute​(T data)
    This method represents the input port.
    java.util.List<T> getList()
    Delivers a copy of the internal list.
    teetime.framework.OutputPort<T> getOutputPort()  
    int size()  

    Methods inherited from class teetime.framework.AbstractConsumerStage

    createInputPort, execute, getInputPort

    Methods inherited from class teetime.framework.AbstractStage

    abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, getTerminationStrategy, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ListCollectionFilter

      public ListCollectionFilter​(int maxNumberOfEntries, ListCollectionFilter.ListFullBehavior listFullBehavior)
      Creates a new instance of this class using the given parameters.
      Parameters:
      maxNumberOfEntries - max number of entries to be stored in list (-1 for unlimited)
      listFullBehavior - behavior when list is full
  • Method Details

    • execute

      protected void execute​(T data) throws java.lang.Exception
      This method represents the input port.
      Specified by:
      execute in class teetime.framework.AbstractConsumerStage<T>
      Parameters:
      data - The next element.
      Throws:
      java.lang.Exception
    • getOutputPort

      public teetime.framework.OutputPort<T> getOutputPort()
    • clear

      public void clear()
      Clears the list.
    • getList

      public java.util.List<T> getList()
      Delivers a copy of the internal list.
      Returns:
      The content of the internal list.
    • size

      public int size()
      Returns:
      The current number of collected objects.