Class Group.Builder (6.107.0)

public static final class Group.Builder extends 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

Implements

GroupOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllTablets(Iterable<? extends Tablet> values)

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;

Parameter
Name Description
values Iterable<? extends com.google.spanner.v1.Tablet>
Returns
Type Description
Group.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Group.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Group.Builder
Overrides

addTablets(Tablet value)

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;

Parameter
Name Description
value Tablet
Returns
Type Description
Group.Builder

addTablets(Tablet.Builder builderForValue)

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;

Parameter
Name Description
builderForValue Tablet.Builder
Returns
Type Description
Group.Builder

addTablets(int index, Tablet value)

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;

Parameters
Name Description
index int
value Tablet
Returns
Type Description
Group.Builder

addTablets(int index, Tablet.Builder builderForValue)

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;

Parameters
Name Description
index int
builderForValue Tablet.Builder
Returns
Type Description
Group.Builder

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;

Returns
Type Description
Tablet.Builder

addTabletsBuilder(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
Tablet.Builder

build()

public Group build()
Returns
Type Description
Group

buildPartial()

public Group buildPartial()
Returns
Type Description
Group

clear()

public Group.Builder clear()
Returns
Type Description
Group.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Group.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Group.Builder
Overrides

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
Type Description
Group.Builder

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
Type Description
Group.Builder

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
Type Description
Group.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Group.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Group.Builder
Overrides

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;

Returns
Type Description
Group.Builder

clone()

public Group.Builder clone()
Returns
Type Description
Group.Builder
Overrides

getDefaultInstanceForType()

public Group getDefaultInstanceForType()
Returns
Type Description
Group

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGeneration()

public 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;

Returns
Type Description
ByteString

The generation.

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;

Returns
Type Description
long

The groupUid.

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;

Returns
Type Description
int

The leaderIndex.

getTablets(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
Tablet

getTabletsBuilder(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
Tablet.Builder

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;

Returns
Type Description
List<Builder>

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;

Returns
Type Description
int

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;

Returns
Type Description
List<Tablet>

getTabletsOrBuilder(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
TabletOrBuilder

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;

Returns
Type Description
List<? extends com.google.spanner.v1.TabletOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Group.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Group.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Group.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Group.Builder
Overrides

mergeFrom(Group other)

public Group.Builder mergeFrom(Group other)
Parameter
Name Description
other Group
Returns
Type Description
Group.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Group.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Group.Builder
Overrides

removeTablets(int index)

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;

Parameter
Name Description
index int
Returns
Type Description
Group.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Group.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Group.Builder
Overrides

setGeneration(ByteString value)

public Group.Builder setGeneration(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;

Parameter
Name Description
value ByteString

The generation to set.

Returns
Type Description
Group.Builder

This builder for chaining.

setGroupUid(long value)

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;

Parameter
Name Description
value long

The groupUid to set.

Returns
Type Description
Group.Builder

This builder for chaining.

setLeaderIndex(int value)

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;

Parameter
Name Description
value int

The leaderIndex to set.

Returns
Type Description
Group.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Group.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Group.Builder
Overrides

setTablets(int index, Tablet value)

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;

Parameters
Name Description
index int
value Tablet
Returns
Type Description
Group.Builder

setTablets(int index, Tablet.Builder builderForValue)

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;

Parameters
Name Description
index int
builderForValue Tablet.Builder
Returns
Type Description
Group.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Group.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Group.Builder
Overrides