public interface OperationService
runOperationOnCallingThread(Operation)
and executeOperation(Operation)
. Or it can executed remotely using one of the send methods.
It also is possible to execute multiple operation on multiple partitions using one of the invoke methods.Modifier and Type | Method and Description |
---|---|
InvocationBuilder |
createInvocationBuilder(String serviceName,
Operation op,
Address target) |
InvocationBuilder |
createInvocationBuilder(String serviceName,
Operation op,
int partitionId) |
void |
execute(Operation op)
Executes an operation in the operation executor pool.
|
void |
executeOperation(Operation op)
Deprecated.
since 3.7. Use
execute(Operation) . |
Map<Integer,Object> |
invokeOnAllPartitions(String serviceName,
OperationFactory operationFactory)
Invokes a set of operation on each partition.
|
<E> InternalCompletableFuture<E> |
invokeOnPartition(Operation op)
Executes an operation on a partition.
|
<E> InternalCompletableFuture<E> |
invokeOnPartition(String serviceName,
Operation op,
int partitionId) |
Map<Integer,Object> |
invokeOnPartitions(String serviceName,
OperationFactory operationFactory,
Collection<Integer> partitions)
Invokes an set of operation on selected set of partitions
*
This method blocks until all operations complete.
|
Map<Integer,Object> |
invokeOnPartitions(String serviceName,
OperationFactory operationFactory,
int[] partitions)
Invokes an set of operation on selected set of partitions
*
This method blocks until all operations complete.
|
<E> InternalCompletableFuture<E> |
invokeOnTarget(String serviceName,
Operation op,
Address target) |
void |
run(Operation op)
Runs an operation in the calling thread.
|
void |
runOperationOnCallingThread(Operation op)
Deprecated.
since 3.7. Use
run(Operation) |
boolean |
send(Operation op,
Address target)
Executes an operation remotely.
|
void runOperationOnCallingThread(Operation op)
run(Operation)
op
- the operation to execute in the calling threadvoid run(Operation op)
op
- the operation to execute in the calling threadvoid executeOperation(Operation op)
execute(Operation)
.op
- the operation to execute in the operation executor pool.void execute(Operation op)
op
- the operation to execute in the operation executor pool.<E> InternalCompletableFuture<E> invokeOnPartition(String serviceName, Operation op, int partitionId)
<E> InternalCompletableFuture<E> invokeOnPartition(Operation op)
E
- the return type of the operation responseop
- the operation<E> InternalCompletableFuture<E> invokeOnTarget(String serviceName, Operation op, Address target)
InvocationBuilder createInvocationBuilder(String serviceName, Operation op, int partitionId)
InvocationBuilder createInvocationBuilder(String serviceName, Operation op, Address target)
Map<Integer,Object> invokeOnAllPartitions(String serviceName, OperationFactory operationFactory) throws Exception
serviceName
- the name of the service.operationFactory
- the factory responsible for creating operationsException
Map<Integer,Object> invokeOnPartitions(String serviceName, OperationFactory operationFactory, Collection<Integer> partitions) throws Exception
serviceName
- the name of the serviceoperationFactory
- the factory responsible for creating operationspartitions
- the partitions the operation should be executed on.Exception
Map<Integer,Object> invokeOnPartitions(String serviceName, OperationFactory operationFactory, int[] partitions) throws Exception
serviceName
- the name of the serviceoperationFactory
- the factory responsible for creating operationspartitions
- the partitions the operation should be executed on.Exception
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.