Class KeyRecipe (6.107.0)
Version latestkeyboard_arrow_down
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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
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 ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static KeyRecipe . Builder newBuilder ()
newBuilder(KeyRecipe prototype)
public static KeyRecipe . Builder newBuilder ( KeyRecipe prototype )
Parameter
Name
Description
prototype
KeyRecipe
public static KeyRecipe parseDelimitedFrom ( InputStream input )
public static KeyRecipe parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static KeyRecipe parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static KeyRecipe parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static KeyRecipe parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static KeyRecipe parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static KeyRecipe parseFrom ( CodedInputStream input )
public static KeyRecipe parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static KeyRecipe parseFrom ( InputStream input )
public static KeyRecipe parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static KeyRecipe parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static KeyRecipe parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<KeyRecipe> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getDefaultInstanceForType()
public KeyRecipe getDefaultInstanceForType ()
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 ()
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
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;
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
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 ()
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()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public KeyRecipe . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected KeyRecipe . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public KeyRecipe . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-01-21 UTC."],[],[]]