public interface TaskQueue
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<TaskQueueEntry> |
dequeue(java.lang.String queueName,
long ticket)
Returns the set of task entries from the named queue.
|
void |
enqueue(java.lang.String queueName,
java.util.Set<TaskQueueEntry> entrySet)
Queues a set of task entries to a named queue.
|
void |
enqueue(java.lang.String queueName,
TaskQueueEntry entry)
Queues a single entry to a named queue.
|
java.lang.String[] |
queueNames()
Returns list of queue names.
|
void |
release(java.lang.String queueName,
long ticket,
boolean removeEntries)
Releases the lock upon the named queue, deleting it if
removeEntries
is set to true. |
java.lang.String[] queueNames()
void enqueue(java.lang.String queueName,
TaskQueueEntry entry)
throws java.io.IOException
queueName - the name of the queue on which to writeentry - the task entryjava.io.IOExceptionvoid enqueue(java.lang.String queueName,
java.util.Set<TaskQueueEntry> entrySet)
throws java.io.IOException
queueName - the name of the queue on which to writeentrySet - the set of task entriesjava.io.IOExceptionjava.util.Set<TaskQueueEntry> dequeue(java.lang.String queueName, long ticket) throws java.io.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 queuejava.io.IOExceptionvoid release(java.lang.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 © 2018 DuraSpace. All Rights Reserved.