public interface State
The state of the component that is either managed by the framework (e.g in case of IStatefulBolt
) or managed by the the individual components themselves.
Modifier and Type | Method and Description |
---|---|
void |
commit()
Persist the current state.
|
void |
commit(long txid)
Commit a previously prepared transaction.
|
void |
prepareCommit(long txid)
Invoked by the framework to prepare a transaction for commit.
|
void |
rollback()
Rollback a prepared transaction to the previously committed state.
|
void prepareCommit(long txid)
Invoked by the framework to prepare a transaction for commit. It should be possible to commit the prepared state later.
The same txid can be prepared again, but the next txid cannot be prepared when previous one is not yet committed.
txid
- the transaction idvoid commit(long txid)
Commit a previously prepared transaction. It should be possible to retrieve a committed state later.
txid
- the transaction idvoid commit()
Persist the current state. This is used when the component manages the state.
void rollback()
Rollback a prepared transaction to the previously committed state.
Copyright © 2022 The Apache Software Foundation. All rights reserved.