public class LocalOperationExecutor extends Object implements OperationExecutor
Operation
s locally.
The execution is done in the current JVM.Constructor and Description |
---|
LocalOperationExecutor()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
execute(Operation<T> operation)
Execute an operation immediately.
|
<T> BackgroundOperation<T> |
executeBackground(Operation<T> operation)
Execute an operation in the background.
|
int |
getWeight()
Returns the relative weight of this executor.
|
public <T> T execute(Operation<T> operation)
execute
in interface OperationExecutor
T
- Return value type of the operation.operation
- The operation to execute.public <T> BackgroundOperation<T> executeBackground(Operation<T> operation)
executeBackground
in interface OperationExecutor
T
- Return value type of the operation.operation
- The operation to execute in the background.BackgroundOperation
for retrieving the result of the operation later.public int getWeight()
OperationExecutor
getWeight
in interface OperationExecutor
Copyright © 2018. All rights reserved.