public class JournalIndexTaskQueue extends Object implements IndexTaskQueue
| Modifier and Type | Class and Description |
|---|---|
static class |
JournalIndexTaskQueue.Type |
| Modifier and Type | Field and Description |
|---|---|
static JournalIdentifier |
JOURNAL_ID |
| Constructor and Description |
|---|
JournalIndexTaskQueue(JournalService journalService,
IndexTaskFactory indexTaskFactory,
AnyTypeDao anyTypeDao) |
| Modifier and Type | Method and Description |
|---|---|
static JournalEntry |
createEntry(JournalIndexTaskQueue.Type type,
String handle) |
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()
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.
|
List<IndexTask> |
flushQueue(int numberOfEntries)
Deprecated.
|
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.
|
@Internal public static final JournalIdentifier JOURNAL_ID
public JournalIndexTaskQueue(JournalService journalService, IndexTaskFactory indexTaskFactory, AnyTypeDao anyTypeDao)
public int getSize()
IndexTaskQueuegetSize in interface IndexTaskQueuepublic List<IndexTask> getQueuedEntries()
IndexTaskQueuegetQueuedEntries in interface IndexTaskQueuepublic void enqueue(IndexTask task)
IndexTaskQueueenqueue in interface IndexTaskQueuepublic void enqueueAll(Collection<IndexTask> tasks)
IndexTaskQueueenqueueAll in interface IndexTaskQueue@Deprecated public 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 IndexTaskQueuenumberOfEntries - the maximum number of entries to return. This should return the n first entries in the queue.@Deprecated public 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 IndexTaskQueuepublic 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 IndexTaskQueueaction - action to perform for each entrypublic 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 IndexTaskQueueaction - 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()
IndexTaskQueuereset in interface IndexTaskQueue@Internal public static JournalEntry createEntry(JournalIndexTaskQueue.Type type, String handle)
Copyright © 2003–2016 Atlassian. All rights reserved.