Package org.xwiki.refactoring.batch
Interface BatchOperationExecutor
-
@Role public interface BatchOperationExecutor
Executes a given operation and wraps its sub-operations as part of the same batch (by passing a batch ID to theExecutionContext
).- Since:
- 9.5RC1
- Version:
- $Id: 543ed0337bfd2331c9d63d27373f3b3d2f065454 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E extends Exception>
voidexecute(BatchOperation<E> operation)
Executes a given operation and generates a batch ID if none is already set.<E extends Exception>
voidexecute(BatchOperation<E> operation, String batchId)
String
getCurrentBatchId()
-
-
-
Method Detail
-
execute
<E extends Exception> void execute(BatchOperation<E> operation) throws E extends Exception
Executes a given operation and generates a batch ID if none is already set.- Type Parameters:
E
- the type of exception thrown by theBatchOperation
- Parameters:
operation
- the batch operation to execute- Throws:
E
- in case of problemsE extends Exception
-
execute
<E extends Exception> void execute(BatchOperation<E> operation, String batchId) throws E extends Exception
- Type Parameters:
E
- the type of exception thrown by theBatchOperation
- Parameters:
operation
- the batch operation to executebatchId
- the batch ID to use if none is already set. Ifnull
, a value will be generated- Throws:
E
- in case of problemsE extends Exception
-
getCurrentBatchId
String getCurrentBatchId()
- Returns:
- the current
Execution
's batch ID ornull
if none is set
-
-