ariba.util.core
Class BatchMapProcessor

java.lang.Object
  extended by ariba.util.core.BatchMapProcessor

public abstract class BatchMapProcessor
extends java.lang.Object

Convenience class that abstracts the notion of processing a map of objects in batches.


Constructor Summary
BatchMapProcessor()
           
 
Method Summary
 void process(java.util.Map map, BatchSizer sizer)
          Processes the supplied map which may be of any size.
 void process(java.util.Map map, int batchSize)
          Processes the supplied map which may be of any size.
abstract  void processBatch(java.util.Map map)
          Processes the supplied map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchMapProcessor

public BatchMapProcessor()
Method Detail

processBatch

public abstract void processBatch(java.util.Map map)
                           throws BatchProcessingException
Processes the supplied map.

Throws:
BatchProcessingException - if there is an exception procesing collection

process

public final void process(java.util.Map map,
                          BatchSizer sizer)
                   throws BatchProcessingException
Processes the supplied map which may be of any size. This implementation splits map up into batches and repeatedly calls processBatch(java.util.Map) as necessary.

If map is a SortedMap, then this method calls processBatch(java.util.Map) with SortedMaps.

Each of the calls to process() satisfies the following conditions:

Throws:
BatchProcessingException - if there is an exception procesing the batches

process

public final void process(java.util.Map map,
                          int batchSize)
                   throws BatchProcessingException
Processes the supplied map which may be of any size. This implementation splits map up into batches and repeatedly calls processBatch(java.util.Map) as necessary.

If map is a SortedMap, then this method calls processBatch(java.util.Map) with SortedMaps.

Each of the calls to process() satisfies the following conditions:

Throws:
BatchProcessingException - if there is an exception procesing the batches


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.