Class Range.Builder (6.108.0)

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

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

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.

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.

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 GeneratedMessage.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

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.

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.