Class WikiMarkupContentEntityObjectMigrationWorkSource
java.lang.Object
com.atlassian.confluence.content.render.xhtml.migration.WikiMarkupContentEntityObjectMigrationWorkSource
- All Implemented Interfaces:
BatchableWorkSource<ContentEntityObject>
public class WikiMarkupContentEntityObjectMigrationWorkSource
extends Object
implements BatchableWorkSource<ContentEntityObject>
Source that provides batches of
ContentEntityObject
s that require migration.
This class is thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionWikiMarkupContentEntityObjectMigrationWorkSource
(ContentDao contentDao, int batchSize) WikiMarkupContentEntityObjectMigrationWorkSource
(ContentDao contentDao, int batchSize, int contentCount) -
Method Summary
-
Constructor Details
-
WikiMarkupContentEntityObjectMigrationWorkSource
-
WikiMarkupContentEntityObjectMigrationWorkSource
public WikiMarkupContentEntityObjectMigrationWorkSource(ContentDao contentDao, int batchSize, int contentCount) - Parameters:
contentDao
-batchSize
- the number of items in each batch of workcontentCount
- the total amount of work should you have already pre-computed it.
-
-
Method Details
-
getBatch
Returns a batch of work. When work is exhausted an empty list is returned.- Specified by:
getBatch
in interfaceBatchableWorkSource<ContentEntityObject>
- Returns:
- batch of work
-
hasMoreBatches
public boolean hasMoreBatches()- Specified by:
hasMoreBatches
in interfaceBatchableWorkSource<ContentEntityObject>
- Returns:
- true if more work batches exist
-
numberOfBatches
public int numberOfBatches()- Specified by:
numberOfBatches
in interfaceBatchableWorkSource<ContentEntityObject>
- Returns:
- total number of work batches available.
-
getTotalSize
public int getTotalSize()- Specified by:
getTotalSize
in interfaceBatchableWorkSource<ContentEntityObject>
-
reset
public void reset(int total) Description copied from interface:BatchableWorkSource
Reset the work source ready to begin getting batches again.- Specified by:
reset
in interfaceBatchableWorkSource<ContentEntityObject>
-