public abstract class DistributionQueueWrapper extends Object implements DistributionQueue
Modifier and Type | Field and Description |
---|---|
protected DistributionQueue |
wrappedQueue |
Constructor and Description |
---|
DistributionQueueWrapper(DistributionQueue wrappedQueue) |
Modifier and Type | Method and Description |
---|---|
DistributionQueueEntry |
add(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(String itemId)
gets an item from the queue by specifying its id
|
Iterable<DistributionQueueEntry> |
getItems(int skip,
int limit)
get all the items in the queue
|
String |
getName()
get this queue name
|
DistributionQueueStatus |
getStatus()
returns the status of the queue
|
DistributionQueueEntry |
remove(String itemId)
remove an item from the queue by specifying its id
|
protected final DistributionQueue wrappedQueue
public DistributionQueueWrapper(DistributionQueue wrappedQueue)
@Nonnull public String getName()
DistributionQueue
getName
in interface DistributionQueue
public DistributionQueueEntry add(@Nonnull DistributionQueueItem item)
DistributionQueue
add
in interface DistributionQueue
item
- a distribution item, typically representing a DistributionPackage
to distributenoll
if none is createdpublic DistributionQueueEntry getHead()
DistributionQueue
getHead
in interface DistributionQueue
null
if the queue is empty@Nonnull public Iterable<DistributionQueueEntry> getItems(int skip, int limit)
DistributionQueue
getItems
in interface DistributionQueue
skip
- the number of items to skiplimit
- the maximum number of items to return. use -1 to return all items.Iterable
of DistributionQueueItem
spublic DistributionQueueEntry getItem(@Nonnull String itemId)
DistributionQueue
getItem
in interface DistributionQueue
itemId
- the id of the itemnull
if the item with the given id
doesn't existpublic DistributionQueueEntry remove(@Nonnull String itemId)
DistributionQueue
remove
in interface DistributionQueue
itemId
- the id the itemnull
if the item with the given id
doesn't exist@Nonnull public DistributionQueueStatus getStatus()
DistributionQueue
getStatus
in interface DistributionQueue
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.