public abstract class BlockCommittedEventImpl extends Object implements BlockCommittedEvent
| Constructor and Description |
|---|
BlockCommittedEventImpl() |
| Modifier and Type | Method and Description |
|---|---|
abstract long |
getHeight()
Returns the current blockchain height, which is the height of the last committed block.
|
abstract Snapshot |
getSnapshot()
Returns the current database snapshot.
|
abstract OptionalInt |
getValidatorId()
If this node is a validator,
returns its identifier.
|
static BlockCommittedEventImpl |
valueOf(Snapshot snapshot,
OptionalInt validatorId,
long height)
Creates a new block committed event.
|
public static BlockCommittedEventImpl valueOf(Snapshot snapshot, OptionalInt validatorId, long height)
snapshot - a snapshot of the blockchain statevalidatorId - a validator id. OptionalInt.empty() if this node is not a validatorheight - the current blockchain heightpublic abstract Snapshot getSnapshot()
BlockCommittedEventgetSnapshot in interface BlockCommittedEventpublic abstract OptionalInt getValidatorId()
BlockCommittedEventOptionalInt.empty().getValidatorId in interface BlockCommittedEventpublic abstract long getHeight()
BlockCommittedEventgetHeight in interface BlockCommittedEventCopyright © 2019 Exonum. All rights reserved.