Class KeyRecipe (6.107.0)

public final class KeyRecipe extends GeneratedMessageV3 implements KeyRecipeOrBuilder

A KeyRecipe provides the metadata required to translate reads, mutations, and queries into a byte array in "sortable string format" (ssformat)that can be used with Ranges to route requests. Note that the client must tolerate KeyRecipes that appear to be invalid, since the KeyRecipe format may change over time. Requests with invalid KeyRecipes should be routed to a default server.

Protobuf type google.spanner.v1.KeyRecipe

Implements

KeyRecipeOrBuilder

Static Fields

INDEX_NAME_FIELD_NUMBER

public static final int INDEX_NAME_FIELD_NUMBER
Field Value
Type Description
int

OPERATION_UID_FIELD_NUMBER

public static final int OPERATION_UID_FIELD_NUMBER
Field Value
Type Description
int

PART_FIELD_NUMBER

public static final int PART_FIELD_NUMBER
Field Value
Type Description
int

TABLE_NAME_FIELD_NUMBER

public static final int TABLE_NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static KeyRecipe getDefaultInstance()
Returns
Type Description
KeyRecipe

getDescriptor()

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

newBuilder()

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

newBuilder(KeyRecipe prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public KeyRecipe getDefaultInstanceForType()
Returns
Type Description
KeyRecipe

getIndexName()

public String getIndexName()

An index name, matching the name from the database schema.

string index_name = 2;

Returns
Type Description
String

The indexName.

getIndexNameBytes()

public ByteString getIndexNameBytes()

An index name, matching the name from the database schema.

string index_name = 2;

Returns
Type Description
ByteString

The bytes for indexName.

getOperationUid()

public long getOperationUid()

The UID of a query, matching the UID from RoutingHint.

uint64 operation_uid = 3;

Returns
Type Description
long

The operationUid.

getParserForType()

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

getPart(int index)

public KeyRecipe.Part getPart(int index)

Parts are in the order they should appear in the encoded key.

repeated .google.spanner.v1.KeyRecipe.Part part = 4;

Parameter
Name Description
index int
Returns
Type Description
KeyRecipe.Part

getPartCount()

public int getPartCount()

Parts are in the order they should appear in the encoded key.

repeated .google.spanner.v1.KeyRecipe.Part part = 4;

Returns
Type Description
int

getPartList()

public List<KeyRecipe.Part> getPartList()

Parts are in the order they should appear in the encoded key.

repeated .google.spanner.v1.KeyRecipe.Part part = 4;

Returns
Type Description
List<Part>

getPartOrBuilder(int index)

public KeyRecipe.PartOrBuilder getPartOrBuilder(int index)

Parts are in the order they should appear in the encoded key.

repeated .google.spanner.v1.KeyRecipe.Part part = 4;

Parameter
Name Description
index int
Returns
Type Description
KeyRecipe.PartOrBuilder

getPartOrBuilderList()

public List<? extends KeyRecipe.PartOrBuilder> getPartOrBuilderList()

Parts are in the order they should appear in the encoded key.

repeated .google.spanner.v1.KeyRecipe.Part part = 4;

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTableName()

public String getTableName()

A table name, matching the name from the database schema.

string table_name = 1;

Returns
Type Description
String

The tableName.

getTableNameBytes()

public ByteString getTableNameBytes()

A table name, matching the name from the database schema.

string table_name = 1;

Returns
Type Description
ByteString

The bytes for tableName.

getTargetCase()

public KeyRecipe.TargetCase getTargetCase()
Returns
Type Description
KeyRecipe.TargetCase

hasIndexName()

public boolean hasIndexName()

An index name, matching the name from the database schema.

string index_name = 2;

Returns
Type Description
boolean

Whether the indexName field is set.

hasOperationUid()

public boolean hasOperationUid()

The UID of a query, matching the UID from RoutingHint.

uint64 operation_uid = 3;

Returns
Type Description
boolean

Whether the operationUid field is set.

hasTableName()

public boolean hasTableName()

A table name, matching the name from the database schema.

string table_name = 1;

Returns
Type Description
boolean

Whether the tableName field is set.

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 KeyRecipe.Builder newBuilderForType()
Returns
Type Description
KeyRecipe.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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