Package org.apache.sling.distribution.queue.impl.resource

## Class ResourceQueueProvider

- java.lang.Object
- - org.apache.sling.distribution.queue.impl.resource.ResourceQueueProvider

All Implemented Interfaces:
  `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`

    public class ResourceQueueProvider
    extends Object
    implements org.apache.sling.distribution.queue.impl.DistributionQueueProvider

### Field Summary

Fields
`static String` `QUEUES_ROOT`
`static String` `TYPE`

### Constructor Summary

Constructors
`ResourceQueueProvider​(org.osgi.framework.BundleContext context, org.apache.sling.api.resource.ResourceResolverFactory resolverFactory, String serviceName, String agentName, org.apache.sling.commons.scheduler.Scheduler scheduler, boolean isActive)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`void` `disableQueueProcessing()` disables queue processing
`void` `enableQueueProcessing​(@NotNull org.apache.sling.distribution.queue.impl.DistributionQueueProcessor queueProcessor, String... queueNames)` enables queue processing
`@NotNull DistributionQueue` `getQueue​(@NotNull String queueName)` provide an `DistributionQueueType.ORDERED` queue with the given name
`@NotNull DistributionQueue` `getQueue​(@NotNull String queueName, @NotNull DistributionQueueType type)` provde a queue of the given type with the given name

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

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

### Field Detail

#### TYPE

    public static final String TYPE

See Also:
  Constant Field Values

#### QUEUES_ROOT

    public static final String QUEUES_ROOT

See Also:
  Constant Field Values

### Constructor Detail

#### ResourceQueueProvider

    public ResourceQueueProvider​(org.osgi.framework.BundleContext context,
                                 org.apache.sling.api.resource.ResourceResolverFactory resolverFactory,
                                 String serviceName,
                                 String agentName,
                                 org.apache.sling.commons.scheduler.Scheduler scheduler,
                                 boolean isActive)

### Method Detail

#### getQueue

    @NotNull
    public @NotNull DistributionQueue getQueue​(@NotNull
                                               @NotNull String queueName)
                                        throws DistributionException

Description copied from interface: `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
provide an `DistributionQueueType.ORDERED` queue with the given name

Specified by:
  `getQueue` in interface `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
Parameters:
  `queueName` - the name of the queue to retrieve
Returns:
  a `DistributionQueue`
Throws:
  `DistributionException`

#### getQueue

    @NotNull
    public @NotNull DistributionQueue getQueue​(@NotNull
                                               @NotNull String queueName,
                                               @NotNull
                                               @NotNull DistributionQueueType type)

Description copied from interface: `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
provde a queue of the given type with the given name

Specified by:
  `getQueue` in interface `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
Parameters:
  `queueName` - the name of the queue
  `type` - the type of the queue
Returns:
  a `DistributionQueue`

#### enableQueueProcessing

    public void enableQueueProcessing​(@NotNull
                                      @NotNull org.apache.sling.distribution.queue.impl.DistributionQueueProcessor queueProcessor,
                                      String... queueNames)
                               throws DistributionException

Description copied from interface: `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
enables queue processing

Specified by:
  `enableQueueProcessing` in interface `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
Parameters:
  `queueProcessor` - the queue processor to be used
Throws:
  `DistributionException`

#### disableQueueProcessing

    public void disableQueueProcessing()
                                throws DistributionException

Description copied from interface: `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
disables queue processing

Specified by:
  `disableQueueProcessing` in interface `org.apache.sling.distribution.queue.impl.DistributionQueueProvider`
Throws:
  `DistributionException`

#### close

    public void close()