Class DistributedProcess<I extends Serializable,R extends Serializable>
- java.lang.Object
-
- org.apache.ignite.internal.util.distributed.DistributedProcess<I,R>
-
- Type Parameters:
I- Request type.R- Result type.
public class DistributedProcess<I extends Serializable,R extends Serializable> extends Object
Distributed process is a cluster-wide process that accumulates single nodes results to finish itself.The process consists of the following phases:
- The initial request starts the process. The
InitMessagesent via discovery. - Each server node processes an initial request and sends the single node result to the coordinator. The
SingleNodeMessagesent via communication. - The coordinator accumulate all single nodes results and finish process. The
FullMessagesent via discovery.
Several processes of one type can be started at the same time.
- See Also:
InitMessage,FullMessage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDistributedProcess.DistributedProcessTypeDefines distributed processes.
-
Constructor Summary
Constructors Constructor Description DistributedProcess(GridKernalContext ctx, DistributedProcess.DistributedProcessType type, Function<I,IgniteInternalFuture<R>> exec, CI3<UUID,Map<UUID,R>,Map<UUID,Throwable>> finish)DistributedProcess(GridKernalContext ctx, DistributedProcess.DistributedProcessType type, Function<I,IgniteInternalFuture<R>> exec, CI3<UUID,Map<UUID,R>,Map<UUID,Throwable>> finish, BiFunction<UUID,I,? extends InitMessage<I>> initMsgFactory)
-
-
-
Constructor Detail
-
DistributedProcess
public DistributedProcess(GridKernalContext ctx, DistributedProcess.DistributedProcessType type, Function<I,IgniteInternalFuture<R>> exec, CI3<UUID,Map<UUID,R>,Map<UUID,Throwable>> finish)
- Parameters:
ctx- Kernal context.type- Process type.exec- Execute action and returns future with the single node result to send to the coordinator.finish- Finish process closure. Called on each node when all single nodes results received.
-
DistributedProcess
public DistributedProcess(GridKernalContext ctx, DistributedProcess.DistributedProcessType type, Function<I,IgniteInternalFuture<R>> exec, CI3<UUID,Map<UUID,R>,Map<UUID,Throwable>> finish, BiFunction<UUID,I,? extends InitMessage<I>> initMsgFactory)
- Parameters:
ctx- Kernal context.type- Process type.exec- Execute action and returns future with the single node result to send to the coordinator.finish- Finish process closure. Called on each node when all single nodes results received.initMsgFactory- Factory which creates customInitMessagefor distributed process initialization.
-
-