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 ClassesModifier and TypeInterfaceDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidenableMaxCapacityProtection(boolean enable) Enable or disable max read capacity protection feature on router.voidenableThrottling(boolean enable) Enable or disable read throttling feature on router.intGet the expected number of routers in the cluster.intGet how many routers are living right now in the cluster.booleanbooleanvoidregisterRouter(String instanceId) Register the given router instance into the cluster.voidListen on the router count, get the notification once it's changed.voidunregisterRouter(String instanceId) Unregister the given router instance from the cluster.voidupdateExpectedRouterCount(int expectedNumber) Update the expected number of routers in the cluster.
-
Method Details
-
registerRouter
Register the given router instance into the cluster. -
unregisterRouter
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
Listen on the router count, get the notification once it's changed. -
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()
-