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.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)Messages.Precommitbuild()Messages.PrecommitbuildPartial()Messages.Precommit.Builderclear()Messages.Precommit.BuilderclearBlockHash()Hash of the new block.Messages.Precommit.BuilderclearEpoch()The consensus algorithm epoch to which the message is related.Messages.Precommit.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Messages.Precommit.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Messages.Precommit.BuilderclearProposeHash()Hash of the block proposal.Messages.Precommit.BuilderclearRound()The round to which the message is related.Messages.Precommit.BuilderclearTime()Local time of the validator node when the `Precommit` was created.Messages.Precommit.BuilderclearValidator()ID of the validator endorsing the block.Messages.Precommit.Builderclone()Types.HashgetBlockHash()Hash of the new block.Types.Hash.BuildergetBlockHashBuilder()Hash of the new block.Types.HashOrBuildergetBlockHashOrBuilder()Hash of the new block.Messages.PrecommitgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()longgetEpoch()The consensus algorithm epoch to which the message is related.Types.HashgetProposeHash()Hash of the block proposal.Types.Hash.BuildergetProposeHashBuilder()Hash of the block proposal.Types.HashOrBuildergetProposeHashOrBuilder()Hash of the block proposal.intgetRound()The round to which the message is related.com.google.protobuf.TimestampgetTime()Local time of the validator node when the `Precommit` was created.com.google.protobuf.Timestamp.BuildergetTimeBuilder()Local time of the validator node when the `Precommit` was created.com.google.protobuf.TimestampOrBuildergetTimeOrBuilder()Local time of the validator node when the `Precommit` was created.intgetValidator()ID of the validator endorsing the block.booleanhasBlockHash()Hash of the new block.booleanhasProposeHash()Hash of the block proposal.booleanhasTime()Local time of the validator node when the `Precommit` was created.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Messages.Precommit.BuildermergeBlockHash(Types.Hash value)Hash of the new block.Messages.Precommit.BuildermergeFrom(Messages.Precommit other)Messages.Precommit.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Messages.Precommit.BuildermergeFrom(com.google.protobuf.Message other)Messages.Precommit.BuildermergeProposeHash(Types.Hash value)Hash of the block proposal.Messages.Precommit.BuildermergeTime(com.google.protobuf.Timestamp value)Local time of the validator node when the `Precommit` was created.Messages.Precommit.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Messages.Precommit.BuildersetBlockHash(Types.Hash value)Hash of the new block.Messages.Precommit.BuildersetBlockHash(Types.Hash.Builder builderForValue)Hash of the new block.Messages.Precommit.BuildersetEpoch(long value)The consensus algorithm epoch to which the message is related.Messages.Precommit.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)Messages.Precommit.BuildersetProposeHash(Types.Hash value)Hash of the block proposal.Messages.Precommit.BuildersetProposeHash(Types.Hash.Builder builderForValue)Hash of the block proposal.Messages.Precommit.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)Messages.Precommit.BuildersetRound(int value)The round to which the message is related.Messages.Precommit.BuildersetTime(com.google.protobuf.Timestamp value)Local time of the validator node when the `Precommit` was created.Messages.Precommit.BuildersetTime(com.google.protobuf.Timestamp.Builder builderForValue)Local time of the validator node when the `Precommit` was created.Messages.Precommit.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Messages.Precommit.BuildersetValidator(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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein 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:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
clearField
public Messages.Precommit.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
clearOneof
public Messages.Precommit.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin 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:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin 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:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Messages.Precommit.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
getValidatorin 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:
getEpochin 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:
getRoundin 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:
hasProposeHashin 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:
getProposeHashin 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:
getProposeHashOrBuilderin interfaceMessages.PrecommitOrBuilder
-
hasBlockHash
public boolean hasBlockHash()Hash of the new block.
.exonum.crypto.Hash block_hash = 5;- Specified by:
hasBlockHashin interfaceMessages.PrecommitOrBuilder- Returns:
- Whether the blockHash field is set.
-
getBlockHash
Hash of the new block.
.exonum.crypto.Hash block_hash = 5;- Specified by:
getBlockHashin 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:
getBlockHashOrBuilderin interfaceMessages.PrecommitOrBuilder
-
hasTime
public boolean hasTime()Local time of the validator node when the `Precommit` was created.
.google.protobuf.Timestamp time = 6;- Specified by:
hasTimein 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:
getTimein 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:
getTimeOrBuilderin interfaceMessages.PrecommitOrBuilder
-
setUnknownFields
public final Messages.Precommit.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-
mergeUnknownFields
public final Messages.Precommit.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Messages.Precommit.Builder>
-