public static final class Eraftpb.ConfChangeV2.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder> implements Eraftpb.ConfChangeV2OrBuilder
ConfChangeV2 messages initiate configuration changes. They support both the simple "one at a time" membership change protocol and full Joint Consensus allowing for arbitrary changes in membership. The supplied context is treated as an opaque payload and can be used to attach an action on the state machine to the application of the config change proposal. Note that contrary to Joint Consensus as outlined in the Raft paper[1], configuration changes become active when they are *applied* to the state machine (not when they are appended to the log). The simple protocol can be used whenever only a single change is made. Non-simple changes require the use of Joint Consensus, for which two configuration changes are run. The first configuration change specifies the desired changes and transitions the Raft group into the joint configuration, in which quorum requires a majority of both the pre-changes and post-changes configuration. Joint Consensus avoids entering fragile intermediate configurations that could compromise survivability. For example, without the use of Joint Consensus and running across three availability zones with a replication factor of three, it is not possible to replace a voter without entering an intermediate configuration that does not survive the outage of one availability zone. The provided ConfChangeTransition specifies how (and whether) Joint Consensus is used, and assigns the task of leaving the joint configuration either to Raft or the application. Leaving the joint configuration is accomplished by proposing a ConfChangeV2 with only and optionally the Context field populated. For details on Raft membership changes, see: [1]: https://github.com/ongardie/dissertation/blob/master/online-trim.pdfProtobuf type
eraftpb.ConfChangeV2
Modifier and Type | Method and Description |
---|---|
Eraftpb.ConfChangeV2.Builder |
addAllChanges(Iterable<? extends Eraftpb.ConfChangeSingle> values)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
addChanges(Eraftpb.ConfChangeSingle.Builder builderForValue)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
addChanges(Eraftpb.ConfChangeSingle value)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
addChanges(int index,
Eraftpb.ConfChangeSingle.Builder builderForValue)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
addChanges(int index,
Eraftpb.ConfChangeSingle value)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeSingle.Builder |
addChangesBuilder()
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeSingle.Builder |
addChangesBuilder(int index)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Eraftpb.ConfChangeV2 |
build() |
Eraftpb.ConfChangeV2 |
buildPartial() |
Eraftpb.ConfChangeV2.Builder |
clear() |
Eraftpb.ConfChangeV2.Builder |
clearChanges()
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
clearContext()
bytes context = 3; |
Eraftpb.ConfChangeV2.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Eraftpb.ConfChangeV2.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Eraftpb.ConfChangeV2.Builder |
clearTransition()
.eraftpb.ConfChangeTransition transition = 1; |
Eraftpb.ConfChangeV2.Builder |
clone() |
Eraftpb.ConfChangeSingle |
getChanges(int index)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeSingle.Builder |
getChangesBuilder(int index)
repeated .eraftpb.ConfChangeSingle changes = 2; |
List<Eraftpb.ConfChangeSingle.Builder> |
getChangesBuilderList()
repeated .eraftpb.ConfChangeSingle changes = 2; |
int |
getChangesCount()
repeated .eraftpb.ConfChangeSingle changes = 2; |
List<Eraftpb.ConfChangeSingle> |
getChangesList()
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeSingleOrBuilder |
getChangesOrBuilder(int index)
repeated .eraftpb.ConfChangeSingle changes = 2; |
List<? extends Eraftpb.ConfChangeSingleOrBuilder> |
getChangesOrBuilderList()
repeated .eraftpb.ConfChangeSingle changes = 2; |
com.google.protobuf.ByteString |
getContext()
bytes context = 3; |
Eraftpb.ConfChangeV2 |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Eraftpb.ConfChangeTransition |
getTransition()
.eraftpb.ConfChangeTransition transition = 1; |
int |
getTransitionValue()
.eraftpb.ConfChangeTransition transition = 1; |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Eraftpb.ConfChangeV2.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Eraftpb.ConfChangeV2.Builder |
mergeFrom(Eraftpb.ConfChangeV2 other) |
Eraftpb.ConfChangeV2.Builder |
mergeFrom(com.google.protobuf.Message other) |
Eraftpb.ConfChangeV2.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Eraftpb.ConfChangeV2.Builder |
removeChanges(int index)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
setChanges(int index,
Eraftpb.ConfChangeSingle.Builder builderForValue)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
setChanges(int index,
Eraftpb.ConfChangeSingle value)
repeated .eraftpb.ConfChangeSingle changes = 2; |
Eraftpb.ConfChangeV2.Builder |
setContext(com.google.protobuf.ByteString value)
bytes context = 3; |
Eraftpb.ConfChangeV2.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Eraftpb.ConfChangeV2.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Eraftpb.ConfChangeV2.Builder |
setTransition(Eraftpb.ConfChangeTransition value)
.eraftpb.ConfChangeTransition transition = 1; |
Eraftpb.ConfChangeV2.Builder |
setTransitionValue(int value)
.eraftpb.ConfChangeTransition transition = 1; |
Eraftpb.ConfChangeV2.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2 getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public Eraftpb.ConfChangeV2 build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public Eraftpb.ConfChangeV2 buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public Eraftpb.ConfChangeV2.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField
in interface com.google.protobuf.Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField
in interface com.google.protobuf.Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.google.protobuf.Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface com.google.protobuf.Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface com.google.protobuf.Message.Builder
addRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder mergeFrom(Eraftpb.ConfChangeV2 other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public Eraftpb.ConfChangeV2.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Eraftpb.ConfChangeV2.Builder>
IOException
public int getTransitionValue()
.eraftpb.ConfChangeTransition transition = 1;
getTransitionValue
in interface Eraftpb.ConfChangeV2OrBuilder
public Eraftpb.ConfChangeV2.Builder setTransitionValue(int value)
.eraftpb.ConfChangeTransition transition = 1;
value
- The enum numeric value on the wire for transition to set.public Eraftpb.ConfChangeTransition getTransition()
.eraftpb.ConfChangeTransition transition = 1;
getTransition
in interface Eraftpb.ConfChangeV2OrBuilder
public Eraftpb.ConfChangeV2.Builder setTransition(Eraftpb.ConfChangeTransition value)
.eraftpb.ConfChangeTransition transition = 1;
value
- The transition to set.public Eraftpb.ConfChangeV2.Builder clearTransition()
.eraftpb.ConfChangeTransition transition = 1;
public List<Eraftpb.ConfChangeSingle> getChangesList()
repeated .eraftpb.ConfChangeSingle changes = 2;
getChangesList
in interface Eraftpb.ConfChangeV2OrBuilder
public int getChangesCount()
repeated .eraftpb.ConfChangeSingle changes = 2;
getChangesCount
in interface Eraftpb.ConfChangeV2OrBuilder
public Eraftpb.ConfChangeSingle getChanges(int index)
repeated .eraftpb.ConfChangeSingle changes = 2;
getChanges
in interface Eraftpb.ConfChangeV2OrBuilder
public Eraftpb.ConfChangeV2.Builder setChanges(int index, Eraftpb.ConfChangeSingle value)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder setChanges(int index, Eraftpb.ConfChangeSingle.Builder builderForValue)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder addChanges(Eraftpb.ConfChangeSingle value)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder addChanges(int index, Eraftpb.ConfChangeSingle value)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder addChanges(Eraftpb.ConfChangeSingle.Builder builderForValue)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder addChanges(int index, Eraftpb.ConfChangeSingle.Builder builderForValue)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder addAllChanges(Iterable<? extends Eraftpb.ConfChangeSingle> values)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder clearChanges()
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeV2.Builder removeChanges(int index)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeSingle.Builder getChangesBuilder(int index)
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeSingleOrBuilder getChangesOrBuilder(int index)
repeated .eraftpb.ConfChangeSingle changes = 2;
getChangesOrBuilder
in interface Eraftpb.ConfChangeV2OrBuilder
public List<? extends Eraftpb.ConfChangeSingleOrBuilder> getChangesOrBuilderList()
repeated .eraftpb.ConfChangeSingle changes = 2;
getChangesOrBuilderList
in interface Eraftpb.ConfChangeV2OrBuilder
public Eraftpb.ConfChangeSingle.Builder addChangesBuilder()
repeated .eraftpb.ConfChangeSingle changes = 2;
public Eraftpb.ConfChangeSingle.Builder addChangesBuilder(int index)
repeated .eraftpb.ConfChangeSingle changes = 2;
public List<Eraftpb.ConfChangeSingle.Builder> getChangesBuilderList()
repeated .eraftpb.ConfChangeSingle changes = 2;
public com.google.protobuf.ByteString getContext()
bytes context = 3;
getContext
in interface Eraftpb.ConfChangeV2OrBuilder
public Eraftpb.ConfChangeV2.Builder setContext(com.google.protobuf.ByteString value)
bytes context = 3;
value
- The context to set.public Eraftpb.ConfChangeV2.Builder clearContext()
bytes context = 3;
public final Eraftpb.ConfChangeV2.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
public final Eraftpb.ConfChangeV2.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.google.protobuf.Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Eraftpb.ConfChangeV2.Builder>
Copyright © 2024 PingCAP. All rights reserved.