public class GridClosureProcessor extends GridProcessorAdapter
ctx, log| Constructor and Description |
|---|
GridClosureProcessor(GridKernalContext ctx) |
addAttributes, assertParameter, collectDiscoveryData, onDiscoveryDataReceived, onKernalStart, printMemoryStats, stop, toString, validateNodepublic GridClosureProcessor(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws GridException
start in interface GridComponentstart in class GridProcessorAdapterGridException - Throws in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public GridFuture<?> runAsync(GridClosureCallMode mode, @Nullable Collection<? extends Runnable> jobs, @Nullable Collection<GridNode> nodes)
mode - Distribution mode.jobs - Closures to execute.nodes - Grid nodes.public GridFuture<?> runAsync(GridClosureCallMode mode, @Nullable Collection<? extends Runnable> jobs, @Nullable Collection<GridNode> nodes, boolean sys)
mode - Distribution mode.jobs - Closures to execute.nodes - Grid nodes.sys - If true, then system pool will be used.public GridFuture<?> runAsync(GridClosureCallMode mode, @Nullable Runnable job, @Nullable Collection<GridNode> nodes)
mode - Distribution mode.job - Closure to execute.nodes - Grid nodes.public GridFuture<?> runAsync(GridClosureCallMode mode, @Nullable Runnable job, @Nullable Collection<GridNode> nodes, boolean sys)
mode - Distribution mode.job - Closure to execute.nodes - Grid nodes.sys - If true, then system pool will be used.public <R1,R2> GridFuture<R2> forkjoinAsync(GridClosureCallMode mode, @Nullable Collection<? extends Callable<R1>> jobs, @Nullable GridReducer<R1,R2> rdc, @Nullable Collection<GridNode> nodes)
R1 - Type.R2 - Type.mode - Distribution mode.jobs - Closures to execute.rdc - Reducer.nodes - Grid nodes.public <R> GridFuture<Collection<R>> callAsync(GridClosureCallMode mode, @Nullable Collection<? extends Callable<R>> jobs, @Nullable Collection<GridNode> nodes)
R - Type.mode - Distribution mode.jobs - Closures to execute.nodes - Grid nodes.public <R> GridFuture<Collection<R>> callAsync(GridClosureCallMode mode, @Nullable Collection<? extends Callable<R>> jobs, @Nullable Collection<GridNode> nodes, boolean sys)
R - Type.mode - Distribution mode.jobs - Closures to execute.nodes - Grid nodes.sys - If true, then system pool will be used.public <R> GridFuture<R> callAsync(GridClosureCallMode mode, @Nullable Callable<R> job, @Nullable Collection<GridNode> nodes)
R - Type.mode - Distribution mode.job - Closure to execute.nodes - Grid nodes.public <R> GridFuture<R> affinityCall(@Nullable String cacheName, Object affKey, Callable<R> job, @Nullable Collection<GridNode> nodes)
cacheName - Cache name.affKey - Affinity key.job - Job.nodes - Grid nodes.public GridFuture<?> affinityRun(@Nullable String cacheName, Object affKey, Runnable job, @Nullable Collection<GridNode> nodes)
cacheName - Cache name.affKey - Affinity key.job - Job.nodes - Grid nodes.public <R> GridFuture<R> callAsyncNoFailover(GridClosureCallMode mode, @Nullable Callable<R> job, @Nullable Collection<GridNode> nodes, boolean sys)
R - Type.mode - Distribution mode.job - Closure to execute.nodes - Grid nodes.sys - If true, then system pool will be used.public <R> GridFuture<Collection<R>> callAsyncNoFailover(GridClosureCallMode mode, @Nullable Collection<? extends Callable<R>> jobs, @Nullable Collection<GridNode> nodes, boolean sys)
R - Type.mode - Distribution mode.jobs - Closures to execute.nodes - Grid nodes.sys - If true, then system pool will be used.public <R> GridFuture<R> callAsync(GridClosureCallMode mode, @Nullable Callable<R> job, @Nullable Collection<GridNode> nodes, boolean sys)
R - Type.mode - Distribution mode.job - Closure to execute.nodes - Grid nodes.sys - If true, then system pool will be used.public <T,R> GridFuture<R> callAsync(GridClosure<T,R> job, @Nullable T arg, @Nullable Collection<GridNode> nodes)
job - Job closure.arg - Optional job argument.nodes - Grid nodes.public <T,R> GridFuture<Collection<R>> broadcast(GridClosure<T,R> job, @Nullable T arg, @Nullable Collection<GridNode> nodes)
job - Job closure.arg - Optional job argument.nodes - Grid nodes.public <T,R> GridFuture<Collection<R>> callAsync(GridClosure<T,R> job, @Nullable Collection<? extends T> args, @Nullable Collection<GridNode> nodes)
job - Job closure.args - Job arguments.nodes - Grid nodes.public <T,R1,R2> GridFuture<R2> callAsync(GridClosure<T,R1> job, Collection<? extends T> args, GridReducer<R1,R2> rdc, @Nullable Collection<GridNode> nodes)
job - Job closure.args - Job arguments.rdc - Reducer.nodes - Grid nodes.public GridFuture<?> runLocalSafe(Runnable c)
runLocal(Runnable, boolean) but
in case of rejected execution re-runs the closure in the current thread (blocking).c - Closure to execute.public GridFuture<?> runLocalSafe(Runnable c, boolean sys)
runLocal(Runnable, boolean) but in case of rejected execution re-runs
the closure in the current thread (blocking).c - Closure to execute.sys - If true, then system pool will be used, otherwise public pool will be used.public GridFuture<?> runLocalSafe(Runnable c, GridClosurePolicy plc)
runLocal(Runnable, boolean) but in case of rejected execution re-runs
the closure in the current thread (blocking).c - Closure to execute.plc - Policy to choose executor pool.public <R> GridFuture<R> callLocalSafe(Callable<R> c)
callLocal(Callable, boolean)
but in case of rejected execution re-runs the closure in the current thread (blocking).c - Closure to execute.public <R> GridFuture<R> callLocalSafe(Callable<R> c, boolean sys)
callLocal(Callable, boolean)
but in case of rejected execution re-runs the closure in the current thread (blocking).c - Closure to execute.sys - If true, then system pool will be used, otherwise public pool will be used.public <R> GridFuture<R> callLocalSafe(Callable<R> c, GridClosurePolicy plc)
callLocal(Callable, boolean) but in case of rejected execution re-runs
the closure in the current thread (blocking).c - Closure to execute.plc - Policy to choose executor pool.Copyright © 2014. All rights reserved.