Class Operator.SuspendBehaviorStates
- Enclosing class:
- Operator
SUSPENDED
state.
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 to Operator.isProcessingTuples()
will return true.
The suspend behavior of an Operator can be set by invoking
setSuspendBehavior
. setSuspendBehavior
might be
called from an Operator's constructor or init()
method.
setSuspendBehavior
takes either DROPPING_TUPLES
or PROCESSING_TUPLES
as a valid argument.
Additionally, an Operator will always drop any tuples when it is shut down.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Drop tuples when the Operator is suspended.static final int
Process tuples when the Operator is suspended. -
Method Summary
-
Field Details
-
DROPPING_TUPLES
public static final int DROPPING_TUPLESDrop tuples when the Operator is suspended.- See Also:
-
PROCESSING_TUPLES
public static final int PROCESSING_TUPLESProcess tuples when the Operator is suspended.- See Also:
-