public class FlatBinaryConsumerAssignmentCache extends java.lang.Object implements ConsumerAssignmentCache, org.apache.curator.framework.recipes.cache.NodeCacheListener
| Constructor and 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) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> |
getConsumerSubscriptions() |
boolean |
isAssignedTo(pl.allegro.tech.hermes.api.SubscriptionName subscription) |
boolean |
isStarted() |
void |
nodeChanged() |
void |
registerAssignmentCallback(SubscriptionAssignmentAware callback) |
void |
start() |
void |
stop() |
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)
public void start()
throws java.lang.Exception
start in interface ConsumerAssignmentCachejava.lang.Exceptionpublic void stop()
throws java.lang.Exception
stop in interface ConsumerAssignmentCachejava.lang.Exceptionpublic boolean isStarted()
isStarted in interface ConsumerAssignmentCachepublic boolean isAssignedTo(pl.allegro.tech.hermes.api.SubscriptionName subscription)
isAssignedTo in interface ConsumerAssignmentCachepublic void registerAssignmentCallback(SubscriptionAssignmentAware callback)
registerAssignmentCallback in interface ConsumerAssignmentCachepublic java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> getConsumerSubscriptions()
getConsumerSubscriptions in interface ConsumerAssignmentCachepublic void nodeChanged()
throws java.lang.Exception
nodeChanged in interface org.apache.curator.framework.recipes.cache.NodeCacheListenerjava.lang.Exception