Consistent annotation
The SPL annotation @consistent that defines
consistent regions can be configured according to how and when the
regions are drained, and the maximum amount of time that a region
is allotted for a drain or reset process to complete.
The @consistent annotation can be applied
to primitive and composite operators. Teracloud®
					Streams calculates
the boundaries of the consistent region that is based on the reachability
graph of the annotated operator.
- trigger
- Indicates how the  establishment of a consistent state is triggered. This parameter is required. You
must choose one of the following options: - periodic
- Indicates that the region establishes a consistent state at a specified time interval. When you choose this option,
you must also specify the periodparameter. The interval begins counting after the end of the previously successful consistent state, or a reset to a previously completed consistent state.
- operatorDriven
- Indicates that the start operator of a consistent region triggers the establishment of a consistent state of the region. To use this option, the consistent region must have a single start operator.
 
- period
- If the trigger parameter is set to periodic, this parameter specifies the time in seconds between two consecutive drains of a consistent region. This parameter is required when the trigger is set to periodic. The type of the parameter is - float64. The valid value range is greater than 0.0 seconds. There is no default value.
- drainTimeout
- Indicates the maximum time in seconds that the drain and checkpoint of the region
is allotted to finish processing. If the process takes longer than
the specified time, a failure is reported and the region is reset
to the point of the previously successfully established consistent state. The type of the
parameter is float64. The valid value range is greater than 0.0 seconds. The default value is 180.0 seconds.
- resetTimeout
- Indicates the maximum time in seconds that the reset of the region
is allotted to finish processing. If the process takes longer than
the specified time, a failure is reported and another reset of the
region is attempted. The type of the parameter is float64. The valid value range is greater than 0.0 seconds. The default value is 180.0 seconds.
- maxConsecutiveResetAttempts
- Indicates the maximum number of consecutive attempts to reset a consistent region. After a failure, if the maximum number of attempts is reached, the region stops processing new tuples. After the maximum number of consecutive attempts is reached, a region can be reset only with manual intervention or with a program that calls a method in the consistent region controller. The type of the parameter is int32. The valid value range is greater than 0. The default value is 5 attempts.