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 the 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 Details

    • DROPPING_TUPLES

      public static final int DROPPING_TUPLES
      Drop tuples when the Operator is suspended.
      See Also:
    • PROCESSING_TUPLES

      public static final int PROCESSING_TUPLES
      Process tuples when the Operator is suspended.
      See Also: