Class AppProfile.SingleClusterRoutingPolicy (2.20.2)

public static class AppProfile.SingleClusterRoutingPolicy implements AppProfile.RoutingPolicy

A RoutingPolicy that routes all requests to a specific cluster.

Inheritance

Object > AppProfile.SingleClusterRoutingPolicy

Static 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.

Parameter
NameDescription
protocom.google.bigtable.admin.v2.AppProfile.SingleClusterRouting
Returns
TypeDescription
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.

Parameter
NameDescription
clusterIdString
Returns
TypeDescription
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.

Parameters
NameDescription
clusterIdString
allowTransactionWritesboolean
Returns
TypeDescription
AppProfile.SingleClusterRoutingPolicy

Methods

equals(Object o)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

getAllowTransactionalWrites()

public boolean getAllowTransactionalWrites()

Checks if transactional writes are enabled.

Returns
TypeDescription
boolean

getClusterId()

public String getClusterId()

Gets the target cluster of this policy.

Returns
TypeDescription
String

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides