com.atlassian.confluence.search.lucene
Interface IndexTaskQueue

All Known Implementing Classes:
DatabaseIndexTaskQueue, InMemoryIndexTaskQueue

public interface IndexTaskQueue

Confluence queues all of its index requests and then executes them in bulk. The indexTaskQueue is there to assist in the queueing the tasks until they are ready to be processed.


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

Method Detail

getSize

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

Returns:
size of the queue.

getQueuedEntries

public List getQueuedEntries()
Retrieve a list of all of the queued entries.

Returns:
a list of IndexTask instances.

enqueue

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

Parameters:
task -

enqueueAll

public void enqueueAll(Collection tasks)
Add a collection of tasks to this queue.

Parameters:
tasks -

flushQueue

public List 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

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



Confluence is developed by Atlassian.