Package com.exonum.messages.core
Class Messages.Precommit.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
com.exonum.messages.core.Messages.Precommit.Builder
- All Implemented Interfaces:
Messages.PrecommitOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.lang.Cloneable
- Enclosing class:
- Messages.Precommit
public static final class Messages.Precommit.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder> implements Messages.PrecommitOrBuilder
Pre-commit for a block, essentially meaning that a validator node endorses the block.Protobuf type
exonum.Precommit
-
Method Summary
Modifier and Type Method Description Messages.Precommit.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Messages.Precommit
build()
Messages.Precommit
buildPartial()
Messages.Precommit.Builder
clear()
Messages.Precommit.Builder
clearBlockHash()
Hash of the new block.Messages.Precommit.Builder
clearEpoch()
The consensus algorithm epoch to which the message is related.Messages.Precommit.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Messages.Precommit.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Messages.Precommit.Builder
clearProposeHash()
Hash of the block proposal.Messages.Precommit.Builder
clearRound()
The round to which the message is related.Messages.Precommit.Builder
clearTime()
Local time of the validator node when the `Precommit` was created.Messages.Precommit.Builder
clearValidator()
ID of the validator endorsing the block.Messages.Precommit.Builder
clone()
Types.Hash
getBlockHash()
Hash of the new block.Types.Hash.Builder
getBlockHashBuilder()
Hash of the new block.Types.HashOrBuilder
getBlockHashOrBuilder()
Hash of the new block.Messages.Precommit
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
long
getEpoch()
The consensus algorithm epoch to which the message is related.Types.Hash
getProposeHash()
Hash of the block proposal.Types.Hash.Builder
getProposeHashBuilder()
Hash of the block proposal.Types.HashOrBuilder
getProposeHashOrBuilder()
Hash of the block proposal.int
getRound()
The round to which the message is related.com.google.protobuf.Timestamp
getTime()
Local time of the validator node when the `Precommit` was created.com.google.protobuf.Timestamp.Builder
getTimeBuilder()
Local time of the validator node when the `Precommit` was created.com.google.protobuf.TimestampOrBuilder
getTimeOrBuilder()
Local time of the validator node when the `Precommit` was created.int
getValidator()
ID of the validator endorsing the block.boolean
hasBlockHash()
Hash of the new block.boolean
hasProposeHash()
Hash of the block proposal.boolean
hasTime()
Local time of the validator node when the `Precommit` was created.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Messages.Precommit.Builder
mergeBlockHash(Types.Hash value)
Hash of the new block.Messages.Precommit.Builder
mergeFrom(Messages.Precommit other)
Messages.Precommit.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Messages.Precommit.Builder
mergeFrom(com.google.protobuf.Message other)
Messages.Precommit.Builder
mergeProposeHash(Types.Hash value)
Hash of the block proposal.Messages.Precommit.Builder
mergeTime(com.google.protobuf.Timestamp value)
Local time of the validator node when the `Precommit` was created.Messages.Precommit.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Messages.Precommit.Builder
setBlockHash(Types.Hash value)
Hash of the new block.Messages.Precommit.Builder
setBlockHash(Types.Hash.Builder builderForValue)
Hash of the new block.Messages.Precommit.Builder
setEpoch(long value)
The consensus algorithm epoch to which the message is related.Messages.Precommit.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Messages.Precommit.Builder
setProposeHash(Types.Hash value)
Hash of the block proposal.Messages.Precommit.Builder
setProposeHash(Types.Hash.Builder builderForValue)
Hash of the block proposal.Messages.Precommit.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Messages.Precommit.Builder
setRound(int value)
The round to which the message is related.Messages.Precommit.Builder
setTime(com.google.protobuf.Timestamp value)
Local time of the validator node when the `Precommit` was created.Messages.Precommit.Builder
setTime(com.google.protobuf.Timestamp.Builder builderForValue)
Local time of the validator node when the `Precommit` was created.Messages.Precommit.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Messages.Precommit.Builder
setValidator(int value)
ID of the validator endorsing the block.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
setField
public Messages.Precommit.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
clearField
public Messages.Precommit.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
clearOneof
public Messages.Precommit.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
setRepeatedField
public Messages.Precommit.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
addRepeatedField
public Messages.Precommit.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Messages.Precommit.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
mergeFrom
public Messages.Precommit.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Messages.Precommit.Builder>
- Throws:
java.io.IOException
-
getValidator
public int getValidator()ID of the validator endorsing the block.
uint32 validator = 1;
- Specified by:
getValidator
in interfaceMessages.PrecommitOrBuilder
- Returns:
- The validator.
-
setValidator
ID of the validator endorsing the block.
uint32 validator = 1;
- Parameters:
value
- The validator to set.- Returns:
- This builder for chaining.
-
clearValidator
ID of the validator endorsing the block.
uint32 validator = 1;
- Returns:
- This builder for chaining.
-
getEpoch
public long getEpoch()The consensus algorithm epoch to which the message is related.
uint64 epoch = 2;
- Specified by:
getEpoch
in interfaceMessages.PrecommitOrBuilder
- Returns:
- The epoch.
-
setEpoch
The consensus algorithm epoch to which the message is related.
uint64 epoch = 2;
- Parameters:
value
- The epoch to set.- Returns:
- This builder for chaining.
-
clearEpoch
The consensus algorithm epoch to which the message is related.
uint64 epoch = 2;
- Returns:
- This builder for chaining.
-
getRound
public int getRound()The round to which the message is related.
uint32 round = 3;
- Specified by:
getRound
in interfaceMessages.PrecommitOrBuilder
- Returns:
- The round.
-
setRound
The round to which the message is related.
uint32 round = 3;
- Parameters:
value
- The round to set.- Returns:
- This builder for chaining.
-
clearRound
The round to which the message is related.
uint32 round = 3;
- Returns:
- This builder for chaining.
-
hasProposeHash
public boolean hasProposeHash()Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
- Specified by:
hasProposeHash
in interfaceMessages.PrecommitOrBuilder
- Returns:
- Whether the proposeHash field is set.
-
getProposeHash
Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
- Specified by:
getProposeHash
in interfaceMessages.PrecommitOrBuilder
- Returns:
- The proposeHash.
-
setProposeHash
Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
-
setProposeHash
Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
-
mergeProposeHash
Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
-
clearProposeHash
Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
-
getProposeHashBuilder
Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
-
getProposeHashOrBuilder
Hash of the block proposal. Note that the proposal format is not defined by the core.
.exonum.crypto.Hash propose_hash = 4;
- Specified by:
getProposeHashOrBuilder
in interfaceMessages.PrecommitOrBuilder
-
hasBlockHash
public boolean hasBlockHash()Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
- Specified by:
hasBlockHash
in interfaceMessages.PrecommitOrBuilder
- Returns:
- Whether the blockHash field is set.
-
getBlockHash
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
- Specified by:
getBlockHash
in interfaceMessages.PrecommitOrBuilder
- Returns:
- The blockHash.
-
setBlockHash
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
-
setBlockHash
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
-
mergeBlockHash
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
-
clearBlockHash
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
-
getBlockHashBuilder
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
-
getBlockHashOrBuilder
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;
- Specified by:
getBlockHashOrBuilder
in interfaceMessages.PrecommitOrBuilder
-
hasTime
public boolean hasTime()Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
- Specified by:
hasTime
in interfaceMessages.PrecommitOrBuilder
- Returns:
- Whether the time field is set.
-
getTime
public com.google.protobuf.Timestamp getTime()Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
- Specified by:
getTime
in interfaceMessages.PrecommitOrBuilder
- Returns:
- The time.
-
setTime
Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
-
setTime
Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
-
mergeTime
Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
-
clearTime
Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
-
getTimeBuilder
public com.google.protobuf.Timestamp.Builder getTimeBuilder()Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
-
getTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder()Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;
- Specified by:
getTimeOrBuilder
in interfaceMessages.PrecommitOrBuilder
-
setUnknownFields
public final Messages.Precommit.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
mergeUnknownFields
public final Messages.Precommit.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-