Interface BatchableWorkSource<T>
-
- Type Parameters:
T
- type of the work item
- All Known Implementing Classes:
ContentWithTasksWorkSource
,LatestVersionXhtmlContentWorkSource
,OrderedEntityObjectBatchableWorkSource
,SearchResultsBatchWorkSource
,WikiMarkupContentEntityObjectMigrationWorkSource
,XhtmlContentWorkSource
,XhtmlSpaceDescriptionsWorkSource
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<T>
getBatch()
int
getTotalSize()
boolean
hasMoreBatches()
int
numberOfBatches()
void
reset(int total)
Reset the work source ready to begin getting batches again.
-
-
-
Method Detail
-
getBatch
List<T> 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()
-
-