Package kieker.analysis.util.debug
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
-
Constructor Summary
Constructors Constructor Description ListCollectionFilter(int maxNumberOfEntries, ListCollectionFilter.ListFullBehavior listFullBehavior)
Creates a new instance of this class using the given parameters. -
Method Summary
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
-
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
This method represents the input port.- Specified by:
execute
in classteetime.framework.AbstractConsumerStage<T>
- Parameters:
data
- The next element.- Throws:
java.lang.Exception
-
getOutputPort
-
clear
public void clear()Clears the list. -
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.
-