public static class AppProfile.SingleClusterRoutingPolicy implements AppProfile.RoutingPolicy
A RoutingPolicy that routes all requests to a specific cluster.
Implements
AppProfile.RoutingPolicyStatic Methods
fromProto(AppProfile.SingleClusterRouting proto)
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.
Name | Description |
proto | AppProfile.SingleClusterRouting |
Type | Description |
AppProfile.SingleClusterRoutingPolicy |
of(String clusterId)
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.
Name | Description |
clusterId | String |
Type | Description |
AppProfile.SingleClusterRoutingPolicy |
of(String clusterId, boolean allowTransactionWrites)
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.
Name | Description |
clusterId | String |
allowTransactionWrites | boolean |
Type | Description |
AppProfile.SingleClusterRoutingPolicy |
Methods
equals(Object o)
public boolean equals(Object o)
Name | Description |
o | Object |
Type | Description |
boolean |
getAllowTransactionalWrites()
public boolean getAllowTransactionalWrites()
Checks if transactional writes are enabled.
Type | Description |
boolean |
getClusterId()
public String getClusterId()
Gets the target cluster of this policy.
Type | Description |
String |
hashCode()
public int hashCode()
Type | Description |
int |