Package com.linkedin.venice.meta
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RoutersClusterManager.RouterCountChangedListener
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createRouterClusterConfig()
void
enableMaxCapacityProtection(boolean enable)
Enable or disable max read capacity protection feature on router.void
enableThrottling(boolean enable)
Enable or disable read throttling feature on router.int
getExpectedRoutersCount()
Get the expected number of routers in the cluster.java.util.Set<Instance>
getLiveRouterInstances()
int
getLiveRoutersCount()
Get how many routers are living right now in the cluster.boolean
isMaxCapacityProtectionEnabled()
boolean
isThrottlingEnabled()
void
registerRouter(java.lang.String instanceId)
Register the given router instance into the cluster.void
subscribeRouterCountChangedEvent(RoutersClusterManager.RouterCountChangedListener listener)
Listen on the router count, get the notification once it's changed.void
unregisterRouter(java.lang.String instanceId)
Unregister the given router instance from the cluster.void
updateExpectedRouterCount(int expectedNumber)
Update the expected number of routers in the cluster.
-
-
-
Method Detail
-
registerRouter
void registerRouter(java.lang.String instanceId)
Register the given router instance into the cluster.
-
unregisterRouter
void unregisterRouter(java.lang.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
java.util.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()
-
-