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
Constructor
Description
`MessagingCacheCallback(org.apache.sling.distribution.journal.MessagingProvider messagingProvider, String packageTopic, PublishMetrics publishMetrics, DiscoveryService discoveryService, Consumer<org.apache.sling.distribution.journal.messages.ClearCommand> commandSender)`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### MessagingCacheCallback

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

## Method Details

### 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`