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
A AppProfile.RoutingPolicy that routes all requests to a specific cluster.
  • Method Details

    • fromProto

      @InternalApi public static AppProfile.SingleClusterRoutingPolicy fromProto(com.google.bigtable.admin.v2.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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object