com.atlassian.confluence.content.render.xhtml.migration
Interface BatchableWorkSource<T>

Type Parameters:
T - type of the work item
All Known Implementing Classes:
AbstractOrderedEntityObjectBatchableWorkSource, 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
 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()


Copyright © 2003–2015 Atlassian. All rights reserved.