public class BigtableInstanceGrpcClient extends Object implements BigtableInstanceClient
BigtableInstanceGrpcClient class.
Constructor and Description |
---|
BigtableInstanceGrpcClient(io.grpc.Channel channel)
Constructor for BigtableInstanceGrpcClient.
|
Modifier and Type | Method and Description |
---|---|
com.google.longrunning.Operation |
createInstance(com.google.bigtable.admin.v2.CreateInstanceRequest request)
Create an instance within a project.
|
com.google.protobuf.Empty |
deleteInstance(com.google.bigtable.admin.v2.DeleteInstanceRequest request)
Updates an instance within a project.
|
com.google.bigtable.admin.v2.Cluster |
getCluster(com.google.bigtable.admin.v2.GetClusterRequest request)
Gets information about a cluster.
|
com.google.longrunning.Operation |
getOperation(com.google.longrunning.GetOperationRequest request)
Gets the latest state of a long-running operation.
|
com.google.bigtable.admin.v2.ListClustersResponse |
listCluster(com.google.bigtable.admin.v2.ListClustersRequest request)
Lists information about clusters in an instance.
|
com.google.bigtable.admin.v2.ListInstancesResponse |
listInstances(com.google.bigtable.admin.v2.ListInstancesRequest request)
Lists all instances in the given project.
|
com.google.longrunning.Operation |
updateCluster(com.google.bigtable.admin.v2.Cluster cluster)
Updates a cluster within an instance.
|
com.google.bigtable.admin.v2.Instance |
updateInstance(com.google.bigtable.admin.v2.Instance instance)
Updates an instance within a project.
|
void |
waitForOperation(com.google.longrunning.Operation operation)
Waits for the long running operation to complete by polling with exponential backoff.
|
void |
waitForOperation(com.google.longrunning.Operation operation,
long timeout,
TimeUnit timeUnit)
Waits for the long running operation to complete by polling with exponential backoff.
|
public BigtableInstanceGrpcClient(io.grpc.Channel channel)
Constructor for BigtableInstanceGrpcClient.
channel
- a Channel
object.public com.google.longrunning.Operation createInstance(com.google.bigtable.admin.v2.CreateInstanceRequest request)
createInstance
in interface BigtableInstanceClient
request
- a CreateInstanceRequest
object.Operation
object.public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request)
BigtableInstanceClient.createInstance(CreateInstanceRequest)
and BigtableInstanceClient.updateCluster(Cluster)
will
return a Operation
. Use this method and pass in the Operation
's name in the
request to see if the Operation is done via Operation.getDone()
. The instance will not
be available until that happens.
getOperation
in interface BigtableInstanceClient
request
- a GetOperationRequest
object.Operation
object.public void waitForOperation(com.google.longrunning.Operation operation) throws IOException, TimeoutException
waitForOperation
in interface BigtableInstanceClient
IOException
TimeoutException
- If the timeout is exceeded.public void waitForOperation(com.google.longrunning.Operation operation, long timeout, TimeUnit timeUnit) throws TimeoutException, IOException
waitForOperation
in interface BigtableInstanceClient
TimeoutException
- If the timeout is exceeded.IOException
public com.google.bigtable.admin.v2.ListInstancesResponse listInstances(com.google.bigtable.admin.v2.ListInstancesRequest request)
listInstances
in interface BigtableInstanceClient
request
- a ListInstancesRequest
object.ListInstancesResponse
object.public com.google.bigtable.admin.v2.Instance updateInstance(com.google.bigtable.admin.v2.Instance instance)
updateInstance
in interface BigtableInstanceClient
instance
- a Instance
object.Instance
object.public com.google.protobuf.Empty deleteInstance(com.google.bigtable.admin.v2.DeleteInstanceRequest request)
deleteInstance
in interface BigtableInstanceClient
request
- a DeleteInstanceRequest
object.Empty
object.public com.google.bigtable.admin.v2.Cluster getCluster(com.google.bigtable.admin.v2.GetClusterRequest request)
getCluster
in interface BigtableInstanceClient
request
- a GetClusterRequest
object.Cluster
object.public com.google.bigtable.admin.v2.ListClustersResponse listCluster(com.google.bigtable.admin.v2.ListClustersRequest request)
listCluster
in interface BigtableInstanceClient
request
- a ListClustersRequest
object.ListClustersResponse
object.public com.google.longrunning.Operation updateCluster(com.google.bigtable.admin.v2.Cluster cluster)
updateCluster
in interface BigtableInstanceClient
cluster
- a Cluster
object.Operation
object.