com.atlassian.confluence.plugins.edgeindex.lucene
Interface EdgeIndexTaskQueue

All Known Implementing Classes:
InMemoryEdgeIndexTaskQueue

public interface EdgeIndexTaskQueue


Method Summary
 void enqueue(EdgeIndexTask task)
          Add a new task to this queue.
 void enqueueAll(java.util.Collection<EdgeIndexTask> tasks)
          Add a collection of tasks to this queue.
 java.util.List<EdgeIndexTask> flushQueue()
          Flush the contents of the queue, returning those elements currently queued as the result.
 java.util.List<EdgeIndexTask> flushQueue(int numberOfEntries)
          Flush the contents of the queue, returning those elements currently queued as the result.
 int getSize()
          Retrieve the number of elements in the queue.
 void reset()
          Remove all queued index tasks from this queue.
 

Method Detail

getSize

int getSize()
Retrieve the number of elements in the queue.

Returns:
size of the queue.

enqueue

void enqueue(EdgeIndexTask task)
Add a new task to this queue.

Parameters:
task -

enqueueAll

void enqueueAll(java.util.Collection<EdgeIndexTask> tasks)
Add a collection of tasks to this queue.

Parameters:
tasks -

flushQueue

java.util.List<EdgeIndexTask> flushQueue(int numberOfEntries)
Flush the contents of the queue, returning those elements currently queued as the result.

Parameters:
numberOfEntries - the maximum number of entries to return. This should return the n first entries in the queue.
Returns:
the list of entries on the queue when it was flushed.

flushQueue

java.util.List<EdgeIndexTask> flushQueue()
Flush the contents of the queue, returning those elements currently queued as the result.

Returns:
the list of entries on the queue when it was flushed.

reset

void reset()
Remove all queued index tasks from this queue.



Copyright © 2003-2013 Atlassian. All Rights Reserved.