Class AppProfile.SingleClusterRoutingPolicy
- java.lang.Object
-
- com.google.cloud.bigtable.admin.v2.models.AppProfile.SingleClusterRoutingPolicy
-
- All Implemented Interfaces:
AppProfile.RoutingPolicy
- Enclosing class:
- AppProfile
public static class AppProfile.SingleClusterRoutingPolicy extends Object implements AppProfile.RoutingPolicy
AAppProfile.RoutingPolicy
that routes all requests to a specific cluster.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static AppProfile.SingleClusterRoutingPolicy
fromProto(AppProfile.SingleClusterRouting proto)
Wraps a protobuf response.boolean
getAllowTransactionalWrites()
Checks if transactional writes are enabled.String
getClusterId()
Gets the target cluster of this policy.int
hashCode()
static AppProfile.SingleClusterRoutingPolicy
of(String clusterId)
Builds a new instance of the routing policy that will send all requests to the specified cluster.static AppProfile.SingleClusterRoutingPolicy
of(String clusterId, boolean allowTransactionWrites)
Builds a new instance of the routing policy that will send all requests to the specified cluster.
-
-
-
Method Detail
-
fromProto
@InternalApi public static AppProfile.SingleClusterRoutingPolicy fromProto(AppProfile.SingleClusterRouting proto)
Wraps a protobuf response.This method is considered an internal implementation detail and not meant to be used by applications.
-
of
public static AppProfile.SingleClusterRoutingPolicy of(String clusterId)
Builds a new instance of the routing policy that will send all requests to the specified cluster.Please note that atomic row transactions will be disabled.
-
of
public static AppProfile.SingleClusterRoutingPolicy of(String clusterId, boolean allowTransactionWrites)
Builds a new instance of the routing policy that will send all requests to the specified cluster. This variant enables the ability to re-enable single row transactions at the cost of consistency.Please see the online documentation for more details.
-
getClusterId
public String getClusterId()
Gets the target cluster of this policy.
-
getAllowTransactionalWrites
public boolean getAllowTransactionalWrites()
Checks if transactional writes are enabled.
-
-