Interface BatchableWorkSource<T>
- Type Parameters:
T
- type of the work item
- All Known Implementing Classes:
ContentWithTasksWorkSource
,LatestVersionXhtmlContentWorkSource
,OrderedEntityObjectBatchableWorkSource
,SearchResultsBatchWorkSource
,WikiMarkupContentEntityObjectMigrationWorkSource
public interface BatchableWorkSource<T>
Source of migration work that can be broken up into batches.
Implementations can contain state to manage how to compute the next batch of work.
Instances should be discarded once there is no more work left to retrieve (i.e. when hasMoreBatches()
returns false)
-
Method Details
-
getBatch
- Returns:
- a batch or subset of the total work contained in the work source
-
hasMoreBatches
boolean hasMoreBatches()- Returns:
- true if more work batches exist
-
numberOfBatches
int numberOfBatches()- Returns:
- total number of work batches available.
-
reset
void reset(int total) Reset the work source ready to begin getting batches again. -
getTotalSize
int getTotalSize()
-