Class Group.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
com.google.spanner.v1.Group.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GroupOrBuilder, Cloneable
Enclosing class:
Group

public static final class Group.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder> implements GroupOrBuilder
 A `Group` represents a paxos group in a database. A group is a set of
 tablets that are replicated across multiple servers. Groups may have a leader
 tablet. Groups store one (or sometimes more) ranges of keys.
 
Protobuf type google.spanner.v1.Group
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • clear

      public Group.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • getDefaultInstanceForType

      public Group getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Group build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Group buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Group.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • setField

      public Group.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • clearField

      public Group.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • clearOneof

      public Group.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • setRepeatedField

      public Group.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • addRepeatedField

      public Group.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • mergeFrom

      public Group.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Group.Builder>
    • mergeFrom

      public Group.Builder mergeFrom(Group other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • mergeFrom

      public Group.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Group.Builder>
      Throws:
      IOException
    • getGroupUid

      public long getGroupUid()
       The UID of the paxos group, unique within the database. Matches the
       `group_uid` field in `Range`.
       
      uint64 group_uid = 1;
      Specified by:
      getGroupUid in interface GroupOrBuilder
      Returns:
      The groupUid.
    • setGroupUid

      public Group.Builder setGroupUid(long value)
       The UID of the paxos group, unique within the database. Matches the
       `group_uid` field in `Range`.
       
      uint64 group_uid = 1;
      Parameters:
      value - The groupUid to set.
      Returns:
      This builder for chaining.
    • clearGroupUid

      public Group.Builder clearGroupUid()
       The UID of the paxos group, unique within the database. Matches the
       `group_uid` field in `Range`.
       
      uint64 group_uid = 1;
      Returns:
      This builder for chaining.
    • getTabletsList

      public List<Tablet> getTabletsList()
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
      Specified by:
      getTabletsList in interface GroupOrBuilder
    • getTabletsCount

      public int getTabletsCount()
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
      Specified by:
      getTabletsCount in interface GroupOrBuilder
    • getTablets

      public Tablet getTablets(int index)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
      Specified by:
      getTablets in interface GroupOrBuilder
    • setTablets

      public Group.Builder setTablets(int index, Tablet value)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • setTablets

      public Group.Builder setTablets(int index, Tablet.Builder builderForValue)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • addTablets

      public Group.Builder addTablets(Tablet value)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • addTablets

      public Group.Builder addTablets(int index, Tablet value)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • addTablets

      public Group.Builder addTablets(Tablet.Builder builderForValue)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • addTablets

      public Group.Builder addTablets(int index, Tablet.Builder builderForValue)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • addAllTablets

      public Group.Builder addAllTablets(Iterable<? extends Tablet> values)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • clearTablets

      public Group.Builder clearTablets()
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • removeTablets

      public Group.Builder removeTablets(int index)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • getTabletsBuilder

      public Tablet.Builder getTabletsBuilder(int index)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • getTabletsOrBuilder

      public TabletOrBuilder getTabletsOrBuilder(int index)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
      Specified by:
      getTabletsOrBuilder in interface GroupOrBuilder
    • getTabletsOrBuilderList

      public List<? extends TabletOrBuilder> getTabletsOrBuilderList()
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
      Specified by:
      getTabletsOrBuilderList in interface GroupOrBuilder
    • addTabletsBuilder

      public Tablet.Builder addTabletsBuilder()
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • addTabletsBuilder

      public Tablet.Builder addTabletsBuilder(int index)
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • getTabletsBuilderList

      public List<Tablet.Builder> getTabletsBuilderList()
       A list of tablets that are part of the group. Note that this list may not
       be exhaustive; it will only include tablets the server considers useful
       to the client. The returned list is ordered ascending by distance.
      
       Tablet UIDs reference `Tablet.tablet_uid`.
       
      repeated .google.spanner.v1.Tablet tablets = 2;
    • getLeaderIndex

      public int getLeaderIndex()
       The last known leader tablet of the group as an index into `tablets`. May
       be negative if the group has no known leader.
       
      int32 leader_index = 3;
      Specified by:
      getLeaderIndex in interface GroupOrBuilder
      Returns:
      The leaderIndex.
    • setLeaderIndex

      public Group.Builder setLeaderIndex(int value)
       The last known leader tablet of the group as an index into `tablets`. May
       be negative if the group has no known leader.
       
      int32 leader_index = 3;
      Parameters:
      value - The leaderIndex to set.
      Returns:
      This builder for chaining.
    • clearLeaderIndex

      public Group.Builder clearLeaderIndex()
       The last known leader tablet of the group as an index into `tablets`. May
       be negative if the group has no known leader.
       
      int32 leader_index = 3;
      Returns:
      This builder for chaining.
    • getGeneration

      public com.google.protobuf.ByteString getGeneration()
       `generation` indicates the freshness of the group information (including
       leader information) contained in this proto. Generations can be compared
       lexicographically; if generation A is greater than generation B, then the
       `Group` corresponding to A is newer than the `Group` corresponding to B,
       and should be used preferentially.
       
      bytes generation = 4;
      Specified by:
      getGeneration in interface GroupOrBuilder
      Returns:
      The generation.
    • setGeneration

      public Group.Builder setGeneration(com.google.protobuf.ByteString value)
       `generation` indicates the freshness of the group information (including
       leader information) contained in this proto. Generations can be compared
       lexicographically; if generation A is greater than generation B, then the
       `Group` corresponding to A is newer than the `Group` corresponding to B,
       and should be used preferentially.
       
      bytes generation = 4;
      Parameters:
      value - The generation to set.
      Returns:
      This builder for chaining.
    • clearGeneration

      public Group.Builder clearGeneration()
       `generation` indicates the freshness of the group information (including
       leader information) contained in this proto. Generations can be compared
       lexicographically; if generation A is greater than generation B, then the
       `Group` corresponding to A is newer than the `Group` corresponding to B,
       and should be used preferentially.
       
      bytes generation = 4;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Group.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    • mergeUnknownFields

      public final Group.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>