public interface

IndexTaskQueue

com.atlassian.confluence.search.lucene.IndexTaskQueue
Known Indirect Subclasses

Class Overview

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.

Summary

Public Methods
void enqueue(IndexTask task)
Add a new task to this queue.
void enqueueAll(Collection<IndexTask> tasks)
Add a collection of tasks to this queue.
List<IndexTask> flushQueue()
Flush the contents of the queue, returning those elements currently queued as the result.
List<IndexTask> flushQueue(int numberOfEntries)
Flush the contents of the queue, returning those elements currently queued as the result.
List<IndexTask> 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.

Public Methods

public void enqueue (IndexTask task)

Add a new task to this queue.

public void enqueueAll (Collection<IndexTask> tasks)

Add a collection of tasks to this queue.

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

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

public List<IndexTask> getQueuedEntries ()

Retrieve a list of all of the queued entries.

Returns
  • a list of IndexTask instances.

public int getSize ()

Retrieve the number of elements in the queue.

Returns
  • size of the queue.

public void reset ()

Remove all queued index tasks from this queue.