|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.search.lucene.queue.JournalIndexTaskQueue
public class JournalIndexTaskQueue
IndexTaskQueue that stores IndexTasks in journal.
Nested Class Summary | |
---|---|
static class |
JournalIndexTaskQueue.Type
|
Field Summary | |
---|---|
static JournalIdentifier |
JOURNAL_ID
|
Constructor Summary | |
---|---|
JournalIndexTaskQueue(JournalService journalService,
IndexTaskFactory indexTaskFactory,
AnyTypeDao anyTypeDao)
|
Method Summary | |
---|---|
static JournalEntry |
createEntry(JournalIndexTaskQueue.Type type,
java.lang.String handle)
|
void |
enqueue(IndexTask task)
Add a new task to this queue. |
void |
enqueueAll(java.util.Collection<IndexTask> tasks)
Add a collection of tasks to this queue. |
java.util.List<IndexTask> |
flushQueue()
Deprecated. |
int |
flushQueue(com.atlassian.fugue.Effect<IndexTask> action)
Flush the contents of the queue, applying the given action to each flushed entry. |
int |
flushQueue(com.atlassian.fugue.Effect<IndexTask> action,
int numberOfEntries)
Flush the contents of the queue, applying the given action to each flushed entry. |
java.util.List<IndexTask> |
flushQueue(int numberOfEntries)
Deprecated. |
java.util.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Internal public static final JournalIdentifier JOURNAL_ID
Constructor Detail |
---|
public JournalIndexTaskQueue(JournalService journalService, IndexTaskFactory indexTaskFactory, AnyTypeDao anyTypeDao)
Method Detail |
---|
public int getSize()
IndexTaskQueue
getSize
in interface IndexTaskQueue
public java.util.List<IndexTask> getQueuedEntries()
IndexTaskQueue
getQueuedEntries
in interface IndexTaskQueue
public void enqueue(IndexTask task)
IndexTaskQueue
enqueue
in interface IndexTaskQueue
public void enqueueAll(java.util.Collection<IndexTask> tasks)
IndexTaskQueue
enqueueAll
in interface IndexTaskQueue
@Deprecated public java.util.List<IndexTask> flushQueue(int numberOfEntries)
IndexTaskQueue
Tasks that were added immediately before calling this method are not
returned. See IndexTaskQueue.flushQueue()
for an alternative.
flushQueue
in interface IndexTaskQueue
numberOfEntries
- the maximum number of entries to return. This should return the n first entries in the queue.
@Deprecated public java.util.List<IndexTask> flushQueue()
IndexTaskQueue
This method waits until tasks that we added immediately before calling
this method are available. See IndexTaskQueue.flushQueue(int)
for an
alternative.
flushQueue
in interface IndexTaskQueue
public int flushQueue(com.atlassian.fugue.Effect<IndexTask> action)
IndexTaskQueue
This method waits until tasks that we added immediately before calling
this method are available. See
IndexTaskQueue.flushQueue(com.atlassian.fugue.Effect, int)
for an alternative.
flushQueue
in interface IndexTaskQueue
action
- action to perform for each entry
public int flushQueue(com.atlassian.fugue.Effect<IndexTask> action, int numberOfEntries)
IndexTaskQueue
Tasks that were added immediately before calling this method are not
returned. See IndexTaskQueue.flushQueue(com.atlassian.fugue.Effect)
for an
alternative.
flushQueue
in interface IndexTaskQueue
action
- action to perform for each entrynumberOfEntries
- the maximum number of entries to flush. This
should flush the n first entries in the queue.
public void reset()
IndexTaskQueue
reset
in interface IndexTaskQueue
@Internal public static JournalEntry createEntry(JournalIndexTaskQueue.Type type, java.lang.String handle)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |