Search in sources :

Example 1 with SimpleAgentDistributionQueue

use of org.apache.sling.distribution.queue.impl.SimpleAgentDistributionQueue in project sling by apache.

the class SimpleDistributionAgent method getQueue.

public DistributionQueue getQueue(@Nonnull final String queueName) {
    Set<String> queues = getQueueNames();
    if (!queues.contains(queueName)) {
        return null;
    }
    DistributionQueue queue = null;
    try {
        queue = queueProvider.getQueue(queueName);
    } catch (DistributionException e) {
        log.error("cannot get queue", e);
    }
    if (queue != null) {
        boolean isPausedQueue = !queueProcessingEnabled && (processingQueues != null && processingQueues.contains(queueName));
        queue = new SimpleAgentDistributionQueue(queue, isPausedQueue, name);
    }
    return queue;
}
Also used : SimpleAgentDistributionQueue(org.apache.sling.distribution.queue.impl.SimpleAgentDistributionQueue) SimpleAgentDistributionQueue(org.apache.sling.distribution.queue.impl.SimpleAgentDistributionQueue) DistributionQueue(org.apache.sling.distribution.queue.DistributionQueue) DistributionException(org.apache.sling.distribution.common.DistributionException)

Aggregations

DistributionException (org.apache.sling.distribution.common.DistributionException)1 DistributionQueue (org.apache.sling.distribution.queue.DistributionQueue)1 SimpleAgentDistributionQueue (org.apache.sling.distribution.queue.impl.SimpleAgentDistributionQueue)1