Class InMemoryCheckpointer
java.lang.Object
org.hyperledger.fabric.client.InMemoryCheckpointer
- All Implemented Interfaces:
Checkpoint, Checkpointer
A non-persistent Checkpointer implementation.
It can be used to checkpoint progress after successfully processing events, allowing eventing to be resumed from this point.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckpointBlock(long blockNumber) Checkpoint a successfully processed block.voidCheckpoint a chaincode event.voidcheckpointTransaction(long blockNumber, String transactionId) Checkpoint a transaction within a block.The block number in which the next event is expected.Transaction Id of the last successfully processed event within the current block.
-
Constructor Details
-
InMemoryCheckpointer
public InMemoryCheckpointer()
-
-
Method Details
-
checkpointBlock
public void checkpointBlock(long blockNumber) Description copied from interface:CheckpointerCheckpoint a successfully processed block.Note that the block number is an unsigned 64-bit integer, with the sign bit used to hold the top bit of the number.
- Specified by:
checkpointBlockin interfaceCheckpointer- Parameters:
blockNumber- a ledger block number.
-
checkpointTransaction
Description copied from interface:CheckpointerCheckpoint a transaction within a block.- Specified by:
checkpointTransactionin interfaceCheckpointer- Parameters:
blockNumber- a ledger block number.transactionId- transaction id within the block.
-
checkpointChaincodeEvent
Description copied from interface:CheckpointerCheckpoint a chaincode event.- Specified by:
checkpointChaincodeEventin interfaceCheckpointer- Parameters:
event- a chaincode event.
-
getBlockNumber
Description copied from interface:CheckpointThe block number in which the next event is expected.- Specified by:
getBlockNumberin interfaceCheckpoint- Returns:
- A ledger block number.
-
getTransactionId
Description copied from interface:CheckpointTransaction Id of the last successfully processed event within the current block.- Specified by:
getTransactionIdin interfaceCheckpoint- Returns:
- A transaction Id.
-