Interface RoutersClusterManager

All Known Implementing Classes:
ZkRoutersClusterManager

public interface RoutersClusterManager
This interface define the operations used to manage all routers in a cluster. Each router could know how many routers are still living through the implementation of this interface.
  • Method Details

    • registerRouter

      void registerRouter(String instanceId)
      Register the given router instance into the cluster.
    • unregisterRouter

      void unregisterRouter(String instanceId)
      Unregister the given router instance from the cluster.
    • getLiveRoutersCount

      int getLiveRoutersCount()
      Get how many routers are living right now in the cluster.
    • getExpectedRoutersCount

      int getExpectedRoutersCount()
      Get the expected number of routers in the cluster.
    • updateExpectedRouterCount

      void updateExpectedRouterCount(int expectedNumber)
      Update the expected number of routers in the cluster.
    • subscribeRouterCountChangedEvent

      void subscribeRouterCountChangedEvent(RoutersClusterManager.RouterCountChangedListener listener)
      Listen on the router count, get the notification once it's changed.
    • getLiveRouterInstances

      Set<Instance> getLiveRouterInstances()
    • isThrottlingEnabled

      boolean isThrottlingEnabled()
    • isMaxCapacityProtectionEnabled

      boolean isMaxCapacityProtectionEnabled()
    • enableThrottling

      void enableThrottling(boolean enable)
      Enable or disable read throttling feature on router. If this feature is disable, router will accept all read request regardless of store's quota.
    • enableMaxCapacityProtection

      void enableMaxCapacityProtection(boolean enable)
      Enable or disable max read capacity protection feature on router. If this feature is disabled, router will not protected by pre-defined max read capacity which means the total quota one router assigned might exceed the max capacity that router could serve.
    • createRouterClusterConfig

      void createRouterClusterConfig()