| Constructor and Description |
|---|
FileTaskQueue() |
| 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 remove)
Releases the lock upon the named queue, deleting it if
removeEntries
is set to true. |
public String[] queueNames()
TaskQueuequeueNames in interface TaskQueuepublic void enqueue(String queueName, TaskQueueEntry entry) throws IOException
TaskQueueenqueue in interface TaskQueuequeueName - the name of the queue on which to writeentry - the task entryIOExceptionpublic void enqueue(String queueName, Set<TaskQueueEntry> entrySet) throws IOException
TaskQueueenqueue in interface TaskQueuequeueName - the name of the queue on which to writeentrySet - the set of task entriesIOExceptionpublic Set<TaskQueueEntry> dequeue(String queueName, long ticket) throws IOException
TaskQueuerelease is called. The ticket may be any number, but a
timestamp should guarantee sufficient uniqueness.dequeue in interface TaskQueuequeueName - the name of the queue to readticket - a token which must be presented to release the queueIOExceptionCopyright © 2013 DuraSpace. All Rights Reserved.