Class FlatBinaryConsumerAssignmentCache
- java.lang.Object
-
- pl.allegro.tech.hermes.consumers.supervisor.workload.FlatBinaryConsumerAssignmentCache
-
- All Implemented Interfaces:
org.apache.curator.framework.recipes.cache.NodeCacheListener,ConsumerAssignmentCache
public class FlatBinaryConsumerAssignmentCache extends java.lang.Object implements ConsumerAssignmentCache, org.apache.curator.framework.recipes.cache.NodeCacheListener
-
-
Constructor Summary
Constructors Constructor Description FlatBinaryConsumerAssignmentCache(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)booleanisStarted()voidnodeChanged()voidregisterAssignmentCallback(SubscriptionAssignmentAware callback)voidstart()voidstop()
-
-
-
Constructor Detail
-
FlatBinaryConsumerAssignmentCache
public FlatBinaryConsumerAssignmentCache(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- Specified by:
startin interfaceConsumerAssignmentCache- Throws:
java.lang.Exception
-
stop
public void stop() throws java.lang.Exception- Specified by:
stopin interfaceConsumerAssignmentCache- Throws:
java.lang.Exception
-
isStarted
public boolean isStarted()
- Specified by:
isStartedin interfaceConsumerAssignmentCache
-
isAssignedTo
public boolean isAssignedTo(pl.allegro.tech.hermes.api.SubscriptionName subscription)
- Specified by:
isAssignedToin interfaceConsumerAssignmentCache
-
registerAssignmentCallback
public void registerAssignmentCallback(SubscriptionAssignmentAware callback)
- Specified by:
registerAssignmentCallbackin interfaceConsumerAssignmentCache
-
getConsumerSubscriptions
public java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> getConsumerSubscriptions()
- Specified by:
getConsumerSubscriptionsin interfaceConsumerAssignmentCache
-
nodeChanged
public void nodeChanged() throws java.lang.Exception- Specified by:
nodeChangedin interfaceorg.apache.curator.framework.recipes.cache.NodeCacheListener- Throws:
java.lang.Exception
-
-