Interface EventsBuilder<T>

Type Parameters:
T - Event type returned by the request.
All Superinterfaces:
Builder<EventsRequest<T>>
All Known Subinterfaces:
BlockAndPrivateDataEventsRequest.Builder, BlockEventsRequest.Builder, ChaincodeEventsRequest.Builder, FilteredBlockEventsRequest.Builder

public interface EventsBuilder<T> extends Builder<EventsRequest<T>>
Builder used to create a new events request.

If both a start block and checkpoint are specified, and the checkpoint has a valid position set, the checkpoint position is used and the specified start block is ignored. If the checkpoint is unset then the start block is used.

If no start position is specified, eventing begins from the next committed block.

  • Method Summary

    Modifier and Type
    Method
    Description
    checkpoint(Checkpoint checkpoint)
    Reads events starting at the checkpoint position.
    startBlock(long blockNumber)
    Specify the block number at which to start reading events.

    Methods inherited from interface org.hyperledger.fabric.client.Builder

    build
  • Method Details

    • startBlock

      EventsBuilder<T> startBlock(long blockNumber)
      Specify the block number at which to start reading events.

      Note that the block number is an unsigned 64-bit integer, with the sign bit used to hold the top bit of the number.

      Parameters:
      blockNumber - a ledger block number.
      Returns:
      This builder.
    • checkpoint

      EventsBuilder<T> checkpoint(Checkpoint checkpoint)
      Reads events starting at the checkpoint position.
      Parameters:
      checkpoint - a checkpoint position.
      Returns:
      This builder.