Class InMemoryCheckpointer

java.lang.Object
org.hyperledger.fabric.client.InMemoryCheckpointer
All Implemented Interfaces:
Checkpoint, Checkpointer

public final class InMemoryCheckpointer extends Object implements 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 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 interface Checkpointer
      Parameters:
      blockNumber - a ledger block number.
    • checkpointTransaction

      public void checkpointTransaction(long blockNumber, String transactionId)
      Description copied from interface: Checkpointer
      Checkpoint a transaction within a block.
      Specified by:
      checkpointTransaction in interface Checkpointer
      Parameters:
      blockNumber - a ledger block number.
      transactionId - transaction id within the block.
    • checkpointChaincodeEvent

      public void checkpointChaincodeEvent(ChaincodeEvent event)
      Description copied from interface: Checkpointer
      Checkpoint a chaincode event.
      Specified by:
      checkpointChaincodeEvent in interface Checkpointer
      Parameters:
      event - a chaincode event.
    • getBlockNumber

      public OptionalLong getBlockNumber()
      Description copied from interface: Checkpoint
      The block number in which the next event is expected.
      Specified by:
      getBlockNumber in interface Checkpoint
      Returns:
      A ledger block number.
    • getTransactionId

      public Optional<String> getTransactionId()
      Description copied from interface: Checkpoint
      Transaction Id of the last successfully processed event within the current block.
      Specified by:
      getTransactionId in interface Checkpoint
      Returns:
      A transaction Id.