Class Operator.SuspendBehaviorStates
- java.lang.Object
-
- com.streambase.sb.operator.Operator.SuspendBehaviorStates
-
- Enclosing class:
- Operator
public static class Operator.SuspendBehaviorStates extends Object
Suspend behavior defines how an Operator handles tuples when it is suspended; meaning when it is in theSUSPENDEDstate.Currently two suspend behaviors can be specified; tuples may either be dropped or processed.
There are also two situations in which an Operator may drop or process tuples if it is suspended. These are when an Operator receives a tuple, and also when it is done processing the tuples and needs to send it downstream. In both cases, if the Operator is suspended, it will consider its current suspend behavior state when deciding how to handle the tuple.
The suspend behavior of an Operator can be queried and set through an api. In particular, if the Operator is currently dropping tuples when suspended then a call to
Operator.isDroppingTuples()will return true. Conversely, if an Operator is processing tuples when suspended then a call toOperator.isProcessingTuples()will return true.The suspend behavior of an Operator can be set by invoking
setSuspendBehavior.setSuspendBehaviormight be called from an Operator's constructor orinit()method.setSuspendBehaviortakes eitherDROPPING_TUPLESorPROCESSING_TUPLESas a valid argument.Additionally, an Operator will always drop any tuples when it is shut down.
-
-
Field Summary
Fields Modifier and Type Field Description static intDROPPING_TUPLESDrop tuples when the Operator is suspended.static intPROCESSING_TUPLESProcess tuples when the Operator is suspended.
-
-
-
Field Detail
-
DROPPING_TUPLES
public static final int DROPPING_TUPLES
Drop tuples when the Operator is suspended.- See Also:
- Constant Field Values
-
PROCESSING_TUPLES
public static final int PROCESSING_TUPLES
Process tuples when the Operator is suspended.- See Also:
- Constant Field Values
-
-