com.google.cloud.bigtable.grpc
Class BigtableInstanceName
- java.lang.Object
-
- com.google.cloud.bigtable.grpc.BigtableInstanceName
-
- All Implemented Interfaces:
- Serializable
public class BigtableInstanceName extends Object implements Serializable
This class encapsulates a Bigtable instance name. An instance name is of the form projects/(projectId)/instances/(instanceId). It also has convenience methods to create a tableName and a tableId. TableName is (instanceName)/tables/(tableId).- Version:
- $Id: $Id
- Author:
- sduskis
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static String
BIGTABLE_V2_INSTANCE_FMT
ConstantBIGTABLE_V2_INSTANCE_FMT="projects/%s/instances/%s"
static String
TABLE_SEPARATOR
ConstantTABLE_SEPARATOR="/tables/"
-
Constructor Summary
Constructors Constructor and Description BigtableInstanceName(String projectId, String instanceId)
Constructor for BigtableInstanceName.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description String
getInstanceId()
String
getInstanceName()
String
getProjectId()
BigtableClusterName
toClusterName(String clusterId)
String
toString()
String
toTableId(String tableName)
Transforms a tableName within this instance of the form projects/(projectId)/instances/(instanceId)/tables/(tableId) to (tableId).BigtableTableName
toTableName(String tableId)
toTableName.String
toTableNameStr(String tableId)
toTableNameStr.
-
-
-
Field Detail
-
BIGTABLE_V2_INSTANCE_FMT
public static final String BIGTABLE_V2_INSTANCE_FMT
ConstantBIGTABLE_V2_INSTANCE_FMT="projects/%s/instances/%s"
- See Also:
- Constant Field Values
-
TABLE_SEPARATOR
public static final String TABLE_SEPARATOR
ConstantTABLE_SEPARATOR="/tables/"
- See Also:
- Constant Field Values
-
-
Method Detail
-
toTableId
public String toTableId(String tableName)
Transforms a tableName within this instance of the form projects/(projectId)/instances/(instanceId)/tables/(tableId) to (tableId).
-
toTableName
public BigtableTableName toTableName(String tableId)
toTableName.- Parameters:
tableId
- aString
object.- Returns:
- a
BigtableTableName
object.
-
getProjectId
public String getProjectId()
- Returns:
- the projectId
-
getInstanceId
public String getInstanceId()
- Returns:
- the instanceId
-
getInstanceName
public String getInstanceName()
- Returns:
- the fully qualified instanceName with the form 'projects/{projectId}/instances/{instanceId}'.
-
toClusterName
public BigtableClusterName toClusterName(String clusterId)
-
-