IndexManager
methods instead of calling corresponding methods on queue directly.
This class is deprecated because Confluence will no longer have only one index queue.@Deprecated public class CompositeIndexTaskQueue<T extends IndexTask> extends Object implements IndexTaskQueue<T>
Constructor and Description |
---|
CompositeIndexTaskQueue(Map<SearchIndex,IndexTaskQueue<T>> taskQueueBySearchIndex,
IndexTaskQueue<T> fallbackQueue)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
enqueue(T task)
Deprecated.
Add a new task to this queue.
|
void |
enqueueAll(Collection<T> tasks)
Deprecated.
Add a collection of tasks to this queue.
|
List<T> |
flushQueue()
Deprecated.
Flush the contents of the queue, returning those elements currently queued as the result.
|
int |
flushQueue(com.atlassian.fugue.Effect<T> actionOnTask)
Deprecated.
Flush the contents of the queue, applying the given action to each
flushed entry.
|
int |
flushQueue(com.atlassian.fugue.Effect<T> actionOnTask,
int numberOfEntries)
Deprecated.
Flush the contents of the queue, applying the given action to each
flushed entry.
|
List<T> |
flushQueue(int numberOfEntries)
Deprecated.
Flush the contents of the queue, returning those elements currently queued as the result.
|
int |
flushQueueWithActionOnIterableOfTasks(Consumer<Iterable<T>> actionOnIterableOfTasks,
int numberOfTasks)
Deprecated.
Flush the contents of the queue, applying the given action to an iterable of tasks.
|
List<T> |
getQueuedEntries()
Deprecated.
Retrieve a list of all of the queued entries.
|
int |
getSize()
Deprecated.
Retrieve the number of elements in the queue.
|
void |
reset()
Deprecated.
Remove all queued index tasks from this queue.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flushAndExecute, flushAndExecute
public CompositeIndexTaskQueue(Map<SearchIndex,IndexTaskQueue<T>> taskQueueBySearchIndex, IndexTaskQueue<T> fallbackQueue)
public int getSize()
IndexTaskQueue
getSize
in interface IndexTaskQueue<T extends IndexTask>
public List<T> getQueuedEntries()
IndexTaskQueue
getQueuedEntries
in interface IndexTaskQueue<T extends IndexTask>
public void enqueue(T task)
IndexTaskQueue
enqueue
in interface IndexTaskQueue<T extends IndexTask>
public void enqueueAll(Collection<T> tasks)
IndexTaskQueue
enqueueAll
in interface IndexTaskQueue<T extends IndexTask>
public List<T> 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<T extends IndexTask>
numberOfEntries
- the maximum number of entries to return. This should return the n first entries in the queue.public List<T> 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<T extends IndexTask>
public int flushQueue(com.atlassian.fugue.Effect<T> actionOnTask)
IndexTaskQueue
This method waits until tasks that we added immediately before calling
this method are available. See
IndexTaskQueue.flushAndExecute(Consumer, int)
for an alternative.
flushQueue
in interface IndexTaskQueue<T extends IndexTask>
actionOnTask
- action to perform for each entrypublic int flushQueue(com.atlassian.fugue.Effect<T> actionOnTask, int numberOfEntries)
IndexTaskQueue
Tasks that were added immediately before calling this method are not
returned. See IndexTaskQueue.flushAndExecute(Consumer)
for an
alternative.
flushQueue
in interface IndexTaskQueue<T extends IndexTask>
actionOnTask
- 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<T extends IndexTask>
public int flushQueueWithActionOnIterableOfTasks(Consumer<Iterable<T>> actionOnIterableOfTasks, int numberOfTasks)
IndexTaskQueue
IndexTaskQueue.flushQueue(Effect, int)
applys an action to an individual task. In contrast, this method applies
an action to an iterable of tasks.
If the specified action throws a RuntimeException, tasks are returned to the queue so that they can be processed again. The exception will be propagated so clients must handle it accordingly.
flushQueueWithActionOnIterableOfTasks
in interface IndexTaskQueue<T extends IndexTask>
actionOnIterableOfTasks
- action on iterable of tasksnumberOfTasks
- the maximum number of tasks to retrieve from the queueCopyright © 2003–2021 Atlassian. All rights reserved.