|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.util.core.BatchProcessor
public abstract class BatchProcessor
Convenience class that abstracts the notion of processing a collection of objects in chunks of a given size.
Constructor Summary | |
---|---|
BatchProcessor()
|
Method Summary | |
---|---|
void |
process(java.util.Collection collection,
BatchSizer sizer)
Processes the supplied collection which may be of any size. |
void |
process(java.util.Collection collection,
int batchSize)
Processes the supplied collection which may be of any size. |
void |
process(java.util.List list,
int batchSize)
Processes the supplied list which may be of any size. |
abstract void |
processBatch(java.util.Collection collection)
Processes the supplied collection . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BatchProcessor()
Method Detail |
---|
public abstract void processBatch(java.util.Collection collection) throws BatchProcessingException
collection
.
BatchProcessingException
- if there is an exception procesing
collection
public final void process(java.util.Collection collection, BatchSizer sizer) throws BatchProcessingException
collection
which may be of any size.
This implementation splits collection
up into batches
and repeatedly calls processBatch(java.util.Collection)
as necessary.
If collection
is a List
, then this
method calls processBatch(java.util.Collection)
with Lists
. Similarly
for SortedSets
.
Each of the calls to
process()
satisfies the following conditions: sizer
BatchProcessingException
- if there is an exception procesing
the batchespublic final void process(java.util.Collection collection, int batchSize) throws BatchProcessingException
collection
which may be of any size.
This implementation splits collection
up into batches
and repeatedly calls processBatch(java.util.Collection)
as necessary.
If collection
is a List
, then this
method calls processBatch(java.util.Collection)
with Lists
. Similarly
for SortedSets
.
Each of the calls to
process()
satisfies the following conditions:
BatchProcessingException
- if there is an exception procesing
the batchespublic final void process(java.util.List list, int batchSize) throws BatchProcessingException
list
which may be of any size.
This implementation splits list
up into batches
and repeatedly calls processBatch(java.util.Collection)
as necessary.
Each of the calls to
process()
satisfies the following conditions:
BatchProcessingException
- if there is an exception procesing
the batches
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |