au.com.prunge.jgenfile
Interface BatchOperation

All Superinterfaces:
FileSystemOperation, Operation
All Known Implementing Classes:
DefaultBatchOperation

public interface BatchOperation
extends FileSystemOperation

A batch operation runs multiple other operations. Implementations might optimize the running of these child operations to increase efficiency.

After the run() method is called, if any operation fails with an exception, the run() method of this operation should also throw an exception. If abortOnError is false, all operations should attempt to execute and after they have finished then an exception should be thrown if one or more of them failed.

Users of a batch operation can query each child operation as to whether it has run and whether an exception was thrown when it was run by accessing the child operation list through the getOperations() method.

Version:
1.0
Author:
Peter Runge

Method Summary
 boolean getAbortOnError()
           
 List getOperations()
          Returns a list of operations this batch operation will execute.
 
Methods inherited from interface au.com.prunge.jgenfile.FileSystemOperation
getFileSystem
 
Methods inherited from interface au.com.prunge.jgenfile.Operation
abort, addOperationHints, getLastRunException, getOperationHint, getOperationHints, hasRun, run, setOperationHint, setOperationHints
 

Method Detail

getOperations

public List getOperations()
Returns a list of operations this batch operation will execute.

Returns:
a list of operations.

getAbortOnError

public boolean getAbortOnError()
Returns:
whether this operation will abort if an error occurs executing one of its component operations.