public class GridSchedulerImpl extends Object implements GridScheduler
GridScheduler implementation.| Constructor and Description |
|---|
GridSchedulerImpl(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
<R> GridFuture<R> |
callLocal(Callable<R> c)
Executes given callable on internal system thread pool asynchronously.
|
GridFuture<?> |
runLocal(Runnable r)
Executes given closure on internal system thread pool asynchronously.
|
<R> GridSchedulerFuture<R> |
scheduleLocal(Callable<R> job,
String ptrn)
Schedules job for execution using local cron-based scheduling.
|
GridSchedulerFuture<?> |
scheduleLocal(Runnable job,
String ptrn)
Schedules job for execution using local cron-based scheduling.
|
public GridSchedulerImpl(GridKernalContext ctx)
ctx - Kernal context.public GridFuture<?> runLocal(Runnable r)
Note that class GridRunnable implements Runnable and class GridOutClosure
implements Callable interface.
runLocal in interface GridSchedulerr - Runnable to execute. If null - this method is no-op.GridScheduler.callLocal(Callable),
GridClosurepublic <R> GridFuture<R> callLocal(Callable<R> c)
Note that class GridRunnable implements Runnable and class GridOutClosure
implements Callable interface.
callLocal in interface GridSchedulerR - Type of the return value for the closure.c - Callable to execute. If null - this method is no-op.GridScheduler.runLocal(Runnable),
GridOutClosurepublic GridSchedulerFuture<?> scheduleLocal(Runnable job, String ptrn)
scheduleLocal in interface GridSchedulerjob - Job to schedule to run as a background cron-based job.
If null - this method is no-op.ptrn - Scheduling pattern in UNIX cron format with optional prefix {n1, n2}
where n1 is delay of scheduling in seconds and n2 is the number of execution. Both
parameters are optional.public <R> GridSchedulerFuture<R> scheduleLocal(Callable<R> job, String ptrn)
scheduleLocal in interface GridSchedulerjob - Job to schedule to run as a background cron-based job.ptrn - Scheduling pattern in UNIX cron format with optional prefix {n1, n2}
where n1 is delay of scheduling in seconds and n2 is the number of execution. Both
parameters are optional.Copyright © 2014. All rights reserved.