public class JobHandlingDistributionQueue extends Object implements DistributionQueue
DistributionQueue based on Sling Job Handling facilities| Modifier and Type | Field and Description |
|---|---|
static String |
DISTRIBUTION_QUEUE_TOPIC |
| Modifier and Type | Method and Description |
|---|---|
DistributionQueueEntry |
add(@NotNull DistributionQueueItem item)
add a distribution item to this queue
|
DistributionQueueEntry |
getHead()
get the first item (in a FIFO strategy, the next to be processed) from the queue
|
DistributionQueueEntry |
getItem(@NotNull String id)
gets an item from the queue by specifying its id
|
@NotNull List<DistributionQueueEntry> |
getItems(int skip,
int limit)
get all the items in the queue
|
@NotNull String |
getName()
get this queue name
|
@NotNull DistributionQueueStatus |
getStatus()
get the status of the queue
|
DistributionQueueType |
getType()
get the type of this queue
|
DistributionQueueEntry |
remove(@NotNull String id)
remove an item from the queue by specifying its id
|
public static final String DISTRIBUTION_QUEUE_TOPIC
@NotNull public @NotNull String getName()
DistributionQueuegetName in interface DistributionQueuepublic DistributionQueueEntry add(@NotNull @NotNull DistributionQueueItem item)
DistributionQueueadd in interface DistributionQueueitem - a distribution item, typically representing a DistributionPackage
to distributenoll if none is createdpublic DistributionQueueEntry getHead()
DistributionQueuegetHead in interface DistributionQueuenull if the queue is empty@NotNull public @NotNull List<DistributionQueueEntry> getItems(int skip, int limit)
DistributionQueuegetItems in interface DistributionQueueskip - the number of items to skiplimit - the maximum number of items to return. use -1 to return all items.Iterable of DistributionQueueItemspublic DistributionQueueEntry getItem(@NotNull @NotNull String id)
DistributionQueuegetItem in interface DistributionQueueid - the id of the item as returned by DistributionQueueItem.getPackageId()null if the item with the given id
doesn't existpublic DistributionQueueEntry remove(@NotNull @NotNull String id)
DistributionQueueremove in interface DistributionQueueid - the id the item as returned by DistributionQueueItem.getPackageId()null if the item with the given id
doesn't exist@NotNull public @NotNull DistributionQueueStatus getStatus()
DistributionQueuegetStatus in interface DistributionQueuepublic DistributionQueueType getType()
DistributionQueuegetType in interface DistributionQueueCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.