public class MultiOperation
extends java.lang.Object
Constructor and Description |
---|
MultiOperation(IOperator operator)
Creates a new multi operation without any operations.
|
Modifier and Type | Method and Description |
---|---|
void |
addOperation(IOperation operation)
Adds the specified operation to the set of operations that should
be executed.
|
IOperation[] |
getOperations()
Returns the operations that are contained in the multi operation.
|
void |
performAsynchronous()
Performs the operations that have not been executed already an
returns immediately.
|
void |
performSynchronous()
Performs the operations that have not been executed already and
synchronizes on their end.
|
boolean |
removeOperation(IOperation operation)
Removes the specified operation from the set of operations that
should be executed.
|
void |
synchronize()
Synchronizes on all operations that are currently executing
and waits until they are finished.
|
public MultiOperation(IOperator operator)
operator
- The operator used to execute the operations.public void addOperation(IOperation operation)
operation
- The operation to execute.public boolean removeOperation(IOperation operation)
operation
- The operation to execute.public IOperation[] getOperations()
public void performAsynchronous()
public void performSynchronous()
public void synchronize()