public interface OperationService
run(Operation)
and execute(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.
|
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.
|
boolean |
send(Operation op,
Address target)
Executes an operation remotely.
|
void run(Operation op)
op - the operation to execute in the calling threadvoid 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 operationsExceptionMap<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.ExceptionMap<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.ExceptionCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.