Package org.hyperledger.fabric.client
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkpointBlock
(long blockNumber) Checkpoint a successfully processed block.void
Checkpoint a chaincode event.void
checkpointTransaction
(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:Checkpointer
Checkpoint 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:
checkpointBlock
in interfaceCheckpointer
- Parameters:
blockNumber
- a ledger block number.
-
checkpointTransaction
Description copied from interface:Checkpointer
Checkpoint a transaction within a block.- Specified by:
checkpointTransaction
in interfaceCheckpointer
- Parameters:
blockNumber
- a ledger block number.transactionId
- transaction id within the block.
-
checkpointChaincodeEvent
Description copied from interface:Checkpointer
Checkpoint a chaincode event.- Specified by:
checkpointChaincodeEvent
in interfaceCheckpointer
- Parameters:
event
- a chaincode event.
-
getBlockNumber
Description copied from interface:Checkpoint
The block number in which the next event is expected.- Specified by:
getBlockNumber
in interfaceCheckpoint
- Returns:
- A ledger block number.
-
getTransactionId
Description copied from interface:Checkpoint
Transaction Id of the last successfully processed event within the current block.- Specified by:
getTransactionId
in interfaceCheckpoint
- Returns:
- A transaction Id.
-