Class FlatBinaryClusterAssignmentCache
- java.lang.Object
-
- pl.allegro.tech.hermes.consumers.supervisor.workload.FlatBinaryClusterAssignmentCache
-
- All Implemented Interfaces:
ClusterAssignmentCache
public class FlatBinaryClusterAssignmentCache extends java.lang.Object implements ClusterAssignmentCache
-
-
Constructor Summary
Constructors Constructor Description FlatBinaryClusterAssignmentCache(org.apache.curator.framework.CuratorFramework curator, java.lang.String clusterName, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, ConsumerNodesRegistry consumerNodesRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionAssignmentViewcreateSnapshot()java.util.Set<java.lang.String>getAssignedConsumers()java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName>getConsumerSubscriptions(java.lang.String consumerId)java.util.Map<pl.allegro.tech.hermes.api.SubscriptionName,java.util.Set<java.lang.String>>getSubscriptionConsumers()booleanisAssignedTo(java.lang.String consumerId, pl.allegro.tech.hermes.api.SubscriptionName subscription)booleanisReady()voidrefresh()
-
-
-
Constructor Detail
-
FlatBinaryClusterAssignmentCache
public FlatBinaryClusterAssignmentCache(org.apache.curator.framework.CuratorFramework curator, java.lang.String clusterName, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, ConsumerNodesRegistry consumerNodesRegistry)
-
-
Method Detail
-
isReady
public boolean isReady()
- Specified by:
isReadyin interfaceClusterAssignmentCache
-
refresh
public void refresh()
- Specified by:
refreshin interfaceClusterAssignmentCache
-
createSnapshot
public SubscriptionAssignmentView createSnapshot()
- Specified by:
createSnapshotin interfaceClusterAssignmentCache
-
isAssignedTo
public boolean isAssignedTo(java.lang.String consumerId, pl.allegro.tech.hermes.api.SubscriptionName subscription)- Specified by:
isAssignedToin interfaceClusterAssignmentCache
-
getSubscriptionConsumers
public java.util.Map<pl.allegro.tech.hermes.api.SubscriptionName,java.util.Set<java.lang.String>> getSubscriptionConsumers()
- Specified by:
getSubscriptionConsumersin interfaceClusterAssignmentCache
-
getAssignedConsumers
public java.util.Set<java.lang.String> getAssignedConsumers()
- Specified by:
getAssignedConsumersin interfaceClusterAssignmentCache
-
getConsumerSubscriptions
public java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> getConsumerSubscriptions(java.lang.String consumerId)
- Specified by:
getConsumerSubscriptionsin interfaceClusterAssignmentCache
-
-