Package org.apache.storm.spout
Class CheckPointState
java.lang.Object
org.apache.storm.spout.CheckPointState
Captures the current state of the transaction in 
CheckpointSpout. The state transitions are as follows.
 
                  ROLLBACK(tx2)
               <-------------                  PREPARE(tx2)                     COMMIT(tx2)
 COMMITTED(tx1)-------------> PREPARING(tx2) --------------> COMMITTING(tx2) -----------------> COMMITTED (tx2)
 
 During recovery, if a previous transaction is in PREPARING state, it is rolled back since all bolts in the topology might not have prepared (saved) the data for commit. If the previous transaction is in COMMITTING state, it is rolled forward (committed) since some bolts might have already committed the data.
During normal flow, the state transitions from PREPARING to COMMITTING to COMMITTED. In case of failures the prepare/commit operation is retried.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumstatic enum
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
CheckPointState
- 
CheckPointStatepublic CheckPointState()
 
- 
- 
Method Details- 
getTxidpublic long getTxid()
- 
getState
- 
nextStateGet the next state based on this checkpoint state.- Parameters:
- recovering- if in recovering phase
- Returns:
- the next checkpoint state based on this state.
 
- 
nextActionGet the next action to perform based on this checkpoint state.- Parameters:
- recovering- if in recovering phase
- Returns:
- the next action to perform based on this state
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-