Class JournalEdgeIndexTaskQueue
- java.lang.Object
-
- com.atlassian.confluence.plugins.edgeindex.JournalEdgeIndexTaskQueue
-
- All Implemented Interfaces:
EdgeIndexTaskQueue
public class JournalEdgeIndexTaskQueue extends Object implements EdgeIndexTaskQueue
-
-
Field Summary
Fields Modifier and Type Field Description static intBATCH_SIZE
-
Constructor Summary
Constructors Constructor Description JournalEdgeIndexTaskQueue(IndexJournalService journalService, EdgeIndexTaskFactory edgeIndexTaskFactory, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenqueue(IndexTaskType indexTaskType, ContentEntityObject target)Add a new task to this queue.voidenqueue(IndexTaskType indexTaskType, Edge edge)Add a new task to this queue.voidenqueue(IndexTaskType indexTaskType, RebuildIndexTask.RebuildIndexParams rebuildIndexParams)Adds aRebuildIndexTaskto the the queuelonggetSize()Retrieve the number of elements in the queue.voidprocessEntries(com.atlassian.fugue.Effect<EdgeIndexTask> action)Apply the given action to contents of the queue.
-
-
-
Field Detail
-
BATCH_SIZE
public static final int BATCH_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JournalEdgeIndexTaskQueue
public JournalEdgeIndexTaskQueue(IndexJournalService journalService, EdgeIndexTaskFactory edgeIndexTaskFactory, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate)
-
-
Method Detail
-
enqueue
public void enqueue(IndexTaskType indexTaskType, ContentEntityObject target)
Description copied from interface:EdgeIndexTaskQueueAdd a new task to this queue.- Specified by:
enqueuein interfaceEdgeIndexTaskQueue
-
enqueue
public void enqueue(IndexTaskType indexTaskType, Edge edge)
Description copied from interface:EdgeIndexTaskQueueAdd a new task to this queue.- Specified by:
enqueuein interfaceEdgeIndexTaskQueue
-
enqueue
public void enqueue(IndexTaskType indexTaskType, RebuildIndexTask.RebuildIndexParams rebuildIndexParams)
Description copied from interface:EdgeIndexTaskQueueAdds aRebuildIndexTaskto the the queue- Specified by:
enqueuein interfaceEdgeIndexTaskQueue
-
getSize
public long getSize()
Description copied from interface:EdgeIndexTaskQueueRetrieve the number of elements in the queue.- Specified by:
getSizein interfaceEdgeIndexTaskQueue- Returns:
- size of the queue.
-
processEntries
public void processEntries(com.atlassian.fugue.Effect<EdgeIndexTask> action)
Description copied from interface:EdgeIndexTaskQueueApply the given action to contents of the queue. Processing is stopped immediately if the action throws an exception when processing an element. Next call to processEntries will start from the failing element.- Specified by:
processEntriesin interfaceEdgeIndexTaskQueue- Parameters:
action- action to apply queue contents
-
-