Class Group (6.107.0)

public final class Group extends GeneratedMessageV3 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 Fields

GENERATION_FIELD_NUMBER

public static final int GENERATION_FIELD_NUMBER
Field Value
Type Description
int

GROUP_UID_FIELD_NUMBER

public static final int GROUP_UID_FIELD_NUMBER
Field Value
Type Description
int

LEADER_INDEX_FIELD_NUMBER

public static final int LEADER_INDEX_FIELD_NUMBER
Field Value
Type Description
int

TABLETS_FIELD_NUMBER

public static final int TABLETS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Group getDefaultInstance()
Returns
Type Description
Group

getDescriptor()

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

newBuilder()

public static Group.Builder newBuilder()
Returns
Type Description
Group.Builder

newBuilder(Group prototype)

public static Group.Builder newBuilder(Group prototype)
Parameter
Name Description
prototype Group
Returns
Type Description
Group.Builder

parseDelimitedFrom(InputStream input)

public static Group parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Group
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Group parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Group
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Group parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Group
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Group parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Group
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Group parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Group
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Group parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Group
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Group parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Group
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Group parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Group
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Group parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Group
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Group parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Group
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Group parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Group
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Group parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Group
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Group> parser()
Returns
Type Description
Parser<Group>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Group getDefaultInstanceForType()
Returns
Type Description
Group

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.

getParserForType()

public Parser<Group> getParserForType()
Returns
Type Description
Parser<Group>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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

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>

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Group.Builder newBuilderForType()
Returns
Type Description
Group.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Group.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Group.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Group.Builder toBuilder()
Returns
Type Description
Group.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException