Class ConsumerAssignmentCache
- java.lang.Object
-
- pl.allegro.tech.hermes.consumers.supervisor.workload.ConsumerAssignmentCache
-
- All Implemented Interfaces:
org.apache.curator.framework.recipes.cache.NodeCacheListener
public class ConsumerAssignmentCache extends java.lang.Object implements org.apache.curator.framework.recipes.cache.NodeCacheListener
-
-
Constructor Summary
Constructors Constructor Description ConsumerAssignmentCache(org.apache.curator.framework.CuratorFramework curator, java.lang.String consumerId, java.lang.String clusterName, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName>getConsumerSubscriptions()booleanisAssignedTo(pl.allegro.tech.hermes.api.SubscriptionName subscription)voidnodeChanged()voidregisterAssignmentCallback(SubscriptionAssignmentAware callback)voidstart()voidstop()
-
-
-
Constructor Detail
-
ConsumerAssignmentCache
public ConsumerAssignmentCache(org.apache.curator.framework.CuratorFramework curator, java.lang.String consumerId, java.lang.String clusterName, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds)
-
-
Method Detail
-
start
public void start() throws java.lang.Exception- Throws:
java.lang.Exception
-
stop
public void stop() throws java.lang.Exception- Throws:
java.lang.Exception
-
isAssignedTo
public boolean isAssignedTo(pl.allegro.tech.hermes.api.SubscriptionName subscription)
-
registerAssignmentCallback
public void registerAssignmentCallback(SubscriptionAssignmentAware callback)
-
getConsumerSubscriptions
public java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> getConsumerSubscriptions()
-
nodeChanged
public void nodeChanged()
- Specified by:
nodeChangedin interfaceorg.apache.curator.framework.recipes.cache.NodeCacheListener
-
-