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 int
BATCH_SIZE
-
Constructor Summary
Constructors Constructor Description JournalEdgeIndexTaskQueue(JournalService journalService, EdgeIndexTaskFactory edgeIndexTaskFactory, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enqueue(IndexTaskType indexTaskType, ContentEntityObject target)
Add a new task to this queue.void
enqueue(IndexTaskType indexTaskType, Edge edge)
Add a new task to this queue.long
getSize()
Retrieve the number of elements in the queue.void
processEntries(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(JournalService journalService, EdgeIndexTaskFactory edgeIndexTaskFactory, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate)
-
-
Method Detail
-
enqueue
public void enqueue(IndexTaskType indexTaskType, ContentEntityObject target)
Description copied from interface:EdgeIndexTaskQueue
Add a new task to this queue.- Specified by:
enqueue
in interfaceEdgeIndexTaskQueue
-
enqueue
public void enqueue(IndexTaskType indexTaskType, Edge edge)
Description copied from interface:EdgeIndexTaskQueue
Add a new task to this queue.- Specified by:
enqueue
in interfaceEdgeIndexTaskQueue
-
getSize
public long getSize()
Description copied from interface:EdgeIndexTaskQueue
Retrieve the number of elements in the queue.- Specified by:
getSize
in interfaceEdgeIndexTaskQueue
- Returns:
- size of the queue.
-
processEntries
public void processEntries(com.atlassian.fugue.Effect<EdgeIndexTask> action)
Description copied from interface:EdgeIndexTaskQueue
Apply 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:
processEntries
in interfaceEdgeIndexTaskQueue
- Parameters:
action
- action to apply queue contents
-
-