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
Modifier and TypeInterfaceDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Get the expected number of routers in the cluster.int
Get how many routers are living right now in the cluster.boolean
boolean
void
registerRouter
(String instanceId) Register the given router instance into the cluster.void
Listen on the router count, get the notification once it's changed.void
unregisterRouter
(String instanceId) Unregister the given router instance from the cluster.void
updateExpectedRouterCount
(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()
-