|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.curate.FileTaskQueue
public class FileTaskQueue
FileTaskQueue provides a TaskQueue implementation based on flat files for the queues and semaphores.
| Constructor Summary | |
|---|---|
FileTaskQueue()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileTaskQueue()
| Method Detail |
|---|
public String[] queueNames()
TaskQueue
queueNames in interface TaskQueue
public void enqueue(String queueName,
TaskQueueEntry entry)
throws IOException
TaskQueue
enqueue in interface TaskQueuequeueName - the name of the queue on which to writeentry - the task entry
IOException
public void enqueue(String queueName,
Set<TaskQueueEntry> entrySet)
throws IOException
TaskQueue
enqueue in interface TaskQueuequeueName - the name of the queue on which to writeentrySet - the set of task entries
IOException
public 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 queue
IOException
public void release(String queueName,
long ticket,
boolean remove)
TaskQueueremoveEntries
is set to true.
release in interface TaskQueuequeueName - the name of the queue to releaseticket - a token that was presented when queue was dequeued.remove - flag to indicate whether entries may be deleted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||