Class Group.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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 Summary

    Modifier and Type
    Method
    Description
    addAllTablets(Iterable<? extends Tablet> values)
    A list of tablets that are part of the group.
    addTablets(int index, Tablet value)
    A list of tablets that are part of the group.
    addTablets(int index, Tablet.Builder builderForValue)
    A list of tablets that are part of the group.
    A list of tablets that are part of the group.
    addTablets(Tablet.Builder builderForValue)
    A list of tablets that are part of the group.
    A list of tablets that are part of the group.
    addTabletsBuilder(int index)
    A list of tablets that are part of the group.
     
     
     
    `generation` indicates the freshness of the group information (including leader information) contained in this proto.
    The UID of the paxos group, unique within the database.
    The last known leader tablet of the group as an index into `tablets`.
    A list of tablets that are part of the group.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.ByteString
    `generation` indicates the freshness of the group information (including leader information) contained in this proto.
    long
    The UID of the paxos group, unique within the database.
    int
    The last known leader tablet of the group as an index into `tablets`.
    getTablets(int index)
    A list of tablets that are part of the group.
    getTabletsBuilder(int index)
    A list of tablets that are part of the group.
    A list of tablets that are part of the group.
    int
    A list of tablets that are part of the group.
    A list of tablets that are part of the group.
    A list of tablets that are part of the group.
    A list of tablets that are part of the group.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    removeTablets(int index)
    A list of tablets that are part of the group.
    setGeneration(com.google.protobuf.ByteString value)
    `generation` indicates the freshness of the group information (including leader information) contained in this proto.
    setGroupUid(long value)
    The UID of the paxos group, unique within the database.
    setLeaderIndex(int value)
    The last known leader tablet of the group as an index into `tablets`.
    setTablets(int index, Tablet value)
    A list of tablets that are part of the group.
    setTablets(int index, Tablet.Builder builderForValue)
    A list of tablets that are part of the group.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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.GeneratedMessage.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.