Package com.linkedin.venice.helix
Class ZkAllowlistAccessor
java.lang.Object
com.linkedin.venice.helix.ZkAllowlistAccessor
- All Implemented Interfaces:
AllowlistAccessor,Closeable,AutoCloseable
Class used to access to the allowlist stored in ZK. As operating allowlist should happen very rarely, all of
request will hit ZK directly without cache.
-
Constructor Summary
ConstructorsConstructorDescriptionZkAllowlistAccessor(String zkAddress) ZkAllowlistAccessor(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstanceToAllowList(String clusterName, String helixNodeId) Add the given helix nodeId into the allowlist in ZK.voidclose()getAllowList(String clusterName) Get all helix nodeIds in the allowlist of the given cluster from ZK.booleanisInstanceInAllowlist(String clusterName, String helixNodeId) Judge whether the given helix nodeId is in the allowlist or not.voidremoveInstanceFromAllowList(String clusterName, String helixNodeId) Remove the given helix nodeId from the allowlist in ZK.
-
Constructor Details
-
ZkAllowlistAccessor
public ZkAllowlistAccessor(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer) -
ZkAllowlistAccessor
-
-
Method Details
-
isInstanceInAllowlist
Judge whether the given helix nodeId is in the allowlist or not.- Specified by:
isInstanceInAllowlistin interfaceAllowlistAccessor
-
getAllowList
Get all helix nodeIds in the allowlist of the given cluster from ZK.- Specified by:
getAllowListin interfaceAllowlistAccessor
-
addInstanceToAllowList
Add the given helix nodeId into the allowlist in ZK.- Specified by:
addInstanceToAllowListin interfaceAllowlistAccessor
-
removeInstanceFromAllowList
Remove the given helix nodeId from the allowlist in ZK.- Specified by:
removeInstanceFromAllowListin interfaceAllowlistAccessor
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-