|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.plugins.edgeindex.lucene.InMemoryEdgeIndexTaskQueue
public class InMemoryEdgeIndexTaskQueue
Bounded index tasks queue. When the limit is reached, the queue discard new task.
Constructor Summary | |
---|---|
InMemoryEdgeIndexTaskQueue()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InMemoryEdgeIndexTaskQueue()
Method Detail |
---|
public int getSize()
EdgeIndexTaskQueue
getSize
in interface EdgeIndexTaskQueue
public void enqueue(EdgeIndexTask task)
EdgeIndexTaskQueue
enqueue
in interface EdgeIndexTaskQueue
public void enqueueAll(java.util.Collection<EdgeIndexTask> tasks)
EdgeIndexTaskQueue
enqueueAll
in interface EdgeIndexTaskQueue
public java.util.List<EdgeIndexTask> flushQueue(int numberOfEntries)
EdgeIndexTaskQueue
flushQueue
in interface EdgeIndexTaskQueue
numberOfEntries
- the maximum number of entries to return. This should return the n first entries in the queue.
public java.util.List<EdgeIndexTask> flushQueue()
EdgeIndexTaskQueue
flushQueue
in interface EdgeIndexTaskQueue
public void reset()
EdgeIndexTaskQueue
reset
in interface EdgeIndexTaskQueue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |