com.atlassian.confluence.content.render.xhtml.migration
Class OrderedEntityObjectBatchableWorkSource<T extends com.atlassian.core.bean.EntityObject>
java.lang.Object
com.atlassian.confluence.content.render.xhtml.migration.OrderedEntityObjectBatchableWorkSource<T>
- All Implemented Interfaces:
- BatchableWorkSource<T>
- Direct Known Subclasses:
- LatestVersionXhtmlContentWorkSource
public class OrderedEntityObjectBatchableWorkSource<T extends com.atlassian.core.bean.EntityObject>
- extends java.lang.Object
- implements BatchableWorkSource<T>
A BatchableWorkSource
implementation which retrieves batches of EntityObject
s by
ordering the entities by their IDs.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrderedEntityObjectBatchableWorkSource
public OrderedEntityObjectBatchableWorkSource(int batchSize,
OrderedEntityObjectBatchableWorkSource.EntitySource<T> entitySource)
getBatch
public java.util.List<T> getBatch()
- Returns a batch of work. When work is exhausted an empty list is returned.
- Specified by:
getBatch
in interface BatchableWorkSource<T extends com.atlassian.core.bean.EntityObject>
- Returns:
- batch of work
hasMoreBatches
public boolean hasMoreBatches()
- Specified by:
hasMoreBatches
in interface BatchableWorkSource<T extends com.atlassian.core.bean.EntityObject>
- Returns:
- true if more work batches exist
numberOfBatches
public int numberOfBatches()
- Specified by:
numberOfBatches
in interface BatchableWorkSource<T extends com.atlassian.core.bean.EntityObject>
- Returns:
- total number of work batches available.
getTotalSize
public int getTotalSize()
- Specified by:
getTotalSize
in interface BatchableWorkSource<T extends com.atlassian.core.bean.EntityObject>
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 interface BatchableWorkSource<T extends com.atlassian.core.bean.EntityObject>
Copyright © 2003-2014 Atlassian. All Rights Reserved.