public interface TaskQueue
| Modifier and Type | Method and Description |
|---|---|
Set<TaskQueueEntry> |
dequeue(String queueName,
long ticket)
Returns the set of task entries from the named queue.
|
void |
enqueue(String queueName,
Set<TaskQueueEntry> entrySet)
Queues a set of task entries to a named queue.
|
void |
enqueue(String queueName,
TaskQueueEntry entry)
Queues a single entry to a named queue.
|
String[] |
queueNames()
Returns list of queue names.
|
void |
release(String queueName,
long ticket,
boolean removeEntries)
Releases the lock upon the named queue, deleting it if
removeEntries
is set to true. |
String[] queueNames()
void enqueue(String queueName, TaskQueueEntry entry) throws IOException
queueName - the name of the queue on which to writeentry - the task entryIOExceptionvoid enqueue(String queueName, Set<TaskQueueEntry> entrySet) throws IOException
queueName - the name of the queue on which to writeentrySet - the set of task entriesIOExceptionSet<TaskQueueEntry> dequeue(String queueName, long ticket) throws IOException
release is called. The ticket may be any number, but a
timestamp should guarantee sufficient uniqueness.queueName - the name of the queue to readticket - a token which must be presented to release the queueIOExceptionvoid release(String queueName, long ticket, boolean removeEntries)
removeEntries
is set to true.queueName - the name of the queue to releaseticket - a token that was presented when queue was dequeued.removeEntries - flag to indicate whether entries may be deletedCopyright © 2016 DuraSpace. All Rights Reserved.