Class Range.Builder (6.107.0)

public static final class Range.Builder extends GeneratedMessageV3.Builder<Range.Builder> implements RangeOrBuilder

A Range represents a range of keys in a database. The keys themselves are encoded in "sortable string format", also known as ssformat. Consult Spanner's open source client libraries for details on the encoding.

Each range represents a contiguous range of rows, possibly from multiple tables/indexes. Each range is associated with a single paxos group (known as a "group" throughout this API), a split (which names the exact range within the group), and a generation that can be used to determine whether a given Range represents a newer or older location for the key range.

Protobuf type google.spanner.v1.Range

Implements

RangeOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Range build()
Returns
Type Description
Range

buildPartial()

public Range buildPartial()
Returns
Type Description
Range

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearGeneration()

public Range.Builder clearGeneration()

generation indicates the freshness of the range information contained in this proto. Generations can be compared lexicographically; if generation A is greater than generation B, then the Range corresponding to A is newer than the Range corresponding to B, and should be used preferentially.

bytes generation = 5;

Returns
Type Description
Range.Builder

This builder for chaining.

clearGroupUid()

public Range.Builder clearGroupUid()

The UID of the paxos group where this range is stored. UIDs are unique within the database. References Group.group_uid.

uint64 group_uid = 3;

Returns
Type Description
Range.Builder

This builder for chaining.

clearLimitKey()

public Range.Builder clearLimitKey()

The limit key of the range, exclusive. Encoded in "sortable string format" (ssformat).

bytes limit_key = 2;

Returns
Type Description
Range.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSplitId()

public Range.Builder clearSplitId()

A group can store multiple ranges of keys. Each key range is named by an ID (the split ID). Within a group, split IDs are unique. The split_id names the exact split in group_uid where this range is stored.

uint64 split_id = 4;

Returns
Type Description
Range.Builder

This builder for chaining.

clearStartKey()

public Range.Builder clearStartKey()

The start key of the range, inclusive. Encoded in "sortable string format" (ssformat).

bytes start_key = 1;

Returns
Type Description
Range.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Range getDefaultInstanceForType()
Returns
Type Description
Range

getDescriptorForType()

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

getGeneration()

public ByteString getGeneration()

generation indicates the freshness of the range information contained in this proto. Generations can be compared lexicographically; if generation A is greater than generation B, then the Range corresponding to A is newer than the Range corresponding to B, and should be used preferentially.

bytes generation = 5;

Returns
Type Description
ByteString

The generation.

getGroupUid()

public long getGroupUid()

The UID of the paxos group where this range is stored. UIDs are unique within the database. References Group.group_uid.

uint64 group_uid = 3;

Returns
Type Description
long

The groupUid.

getLimitKey()

public ByteString getLimitKey()

The limit key of the range, exclusive. Encoded in "sortable string format" (ssformat).

bytes limit_key = 2;

Returns
Type Description
ByteString

The limitKey.

getSplitId()

public long getSplitId()

A group can store multiple ranges of keys. Each key range is named by an ID (the split ID). Within a group, split IDs are unique. The split_id names the exact split in group_uid where this range is stored.

uint64 split_id = 4;

Returns
Type Description
long

The splitId.

getStartKey()

public ByteString getStartKey()

The start key of the range, inclusive. Encoded in "sortable string format" (ssformat).

bytes start_key = 1;

Returns
Type Description
ByteString

The startKey.

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 Range.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Range.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(Range other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setGeneration(ByteString value)

public Range.Builder setGeneration(ByteString value)

generation indicates the freshness of the range information contained in this proto. Generations can be compared lexicographically; if generation A is greater than generation B, then the Range corresponding to A is newer than the Range corresponding to B, and should be used preferentially.

bytes generation = 5;

Parameter
Name Description
value ByteString

The generation to set.

Returns
Type Description
Range.Builder

This builder for chaining.

setGroupUid(long value)

public Range.Builder setGroupUid(long value)

The UID of the paxos group where this range is stored. UIDs are unique within the database. References Group.group_uid.

uint64 group_uid = 3;

Parameter
Name Description
value long

The groupUid to set.

Returns
Type Description
Range.Builder

This builder for chaining.

setLimitKey(ByteString value)

public Range.Builder setLimitKey(ByteString value)

The limit key of the range, exclusive. Encoded in "sortable string format" (ssformat).

bytes limit_key = 2;

Parameter
Name Description
value ByteString

The limitKey to set.

Returns
Type Description
Range.Builder

This builder for chaining.

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

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

setSplitId(long value)

public Range.Builder setSplitId(long value)

A group can store multiple ranges of keys. Each key range is named by an ID (the split ID). Within a group, split IDs are unique. The split_id names the exact split in group_uid where this range is stored.

uint64 split_id = 4;

Parameter
Name Description
value long

The splitId to set.

Returns
Type Description
Range.Builder

This builder for chaining.

setStartKey(ByteString value)

public Range.Builder setStartKey(ByteString value)

The start key of the range, inclusive. Encoded in "sortable string format" (ssformat).

bytes start_key = 1;

Parameter
Name Description
value ByteString

The startKey to set.

Returns
Type Description
Range.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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