public class FlatBinaryClusterAssignmentCache extends java.lang.Object implements ClusterAssignmentCache
| Constructor and Description |
|---|
FlatBinaryClusterAssignmentCache(org.apache.curator.framework.CuratorFramework curator,
java.lang.String clusterName,
pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths,
SubscriptionIds subscriptionIds,
ConsumerNodesRegistry consumerNodesRegistry) |
| Modifier and Type | Method and Description |
|---|---|
SubscriptionAssignmentView |
createSnapshot() |
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() |
boolean |
isAssignedTo(java.lang.String consumerId,
pl.allegro.tech.hermes.api.SubscriptionName subscription) |
boolean |
isReady() |
void |
refresh() |
public FlatBinaryClusterAssignmentCache(org.apache.curator.framework.CuratorFramework curator,
java.lang.String clusterName,
pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths,
SubscriptionIds subscriptionIds,
ConsumerNodesRegistry consumerNodesRegistry)
public boolean isReady()
isReady in interface ClusterAssignmentCachepublic void refresh()
refresh in interface ClusterAssignmentCachepublic SubscriptionAssignmentView createSnapshot()
createSnapshot in interface ClusterAssignmentCachepublic boolean isAssignedTo(java.lang.String consumerId,
pl.allegro.tech.hermes.api.SubscriptionName subscription)
isAssignedTo in interface ClusterAssignmentCachepublic java.util.Map<pl.allegro.tech.hermes.api.SubscriptionName,java.util.Set<java.lang.String>> getSubscriptionConsumers()
getSubscriptionConsumers in interface ClusterAssignmentCachepublic java.util.Set<java.lang.String> getAssignedConsumers()
getAssignedConsumers in interface ClusterAssignmentCachepublic java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> getConsumerSubscriptions(java.lang.String consumerId)
getConsumerSubscriptions in interface ClusterAssignmentCache