Package org.apache.sling.distribution.journal.impl.publisher

## Class MessagingCacheCallback

- java.lang.Object
- - org.apache.sling.distribution.journal.impl.publisher.MessagingCacheCallback

All Implemented Interfaces:
  `CacheCallback`

    public class MessagingCacheCallback
    extends Object
    implements CacheCallback

### Constructor Summary

Constructors
`MessagingCacheCallback​(org.apache.sling.distribution.journal.MessagingProvider messagingProvider, String packageTopic, DistributionMetricsService distributionMetricsService, DiscoveryService discoveryService, Consumer<org.apache.sling.distribution.journal.messages.ClearCommand> commandSender)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Closeable` `createConsumer​(org.apache.sling.distribution.journal.MessageHandler<org.apache.sling.distribution.journal.messages.PackageMessage> handler)`
`List<org.apache.sling.distribution.journal.FullMessage<org.apache.sling.distribution.journal.messages.PackageMessage>>` `fetchRange​(long minOffset, long maxOffset)`
`QueueState` `getQueueState​(String pubAgentName, String subAgentId)`
`Set<String>` `getSubscribedAgentIds​(String pubAgentName)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MessagingCacheCallback

    public MessagingCacheCallback​(org.apache.sling.distribution.journal.MessagingProvider messagingProvider,
                                  String packageTopic,
                                  DistributionMetricsService distributionMetricsService,
                                  DiscoveryService discoveryService,
                                  Consumer<org.apache.sling.distribution.journal.messages.ClearCommand> commandSender)

### Method Detail

#### createConsumer

    public Closeable createConsumer​(org.apache.sling.distribution.journal.MessageHandler<org.apache.sling.distribution.journal.messages.PackageMessage> handler)

Specified by:
  `createConsumer` in interface `CacheCallback`

#### fetchRange

    public List<org.apache.sling.distribution.journal.FullMessage<org.apache.sling.distribution.journal.messages.PackageMessage>> fetchRange​(long minOffset,
                                                                                                                                             long maxOffset)
                                                                                                                                      throws InterruptedException

Specified by:
  `fetchRange` in interface `CacheCallback`
Throws:
  `InterruptedException`

#### getQueueState

    public QueueState getQueueState​(String pubAgentName,
                                    String subAgentId)

Specified by:
  `getQueueState` in interface `CacheCallback`

#### getSubscribedAgentIds

    public Set<String> getSubscribedAgentIds​(String pubAgentName)

Specified by:
  `getSubscribedAgentIds` in interface `CacheCallback`