public class IgniteSchedulerImpl extends Object implements IgniteScheduler, Externalizable
IgniteScheduler
implementation.Constructor and Description |
---|
IgniteSchedulerImpl()
Required by
Externalizable . |
IgniteSchedulerImpl(GridKernalContext ctx) |
Modifier and Type | Method and Description |
---|---|
<R> IgniteFuture<R> |
callLocal(Callable<R> c)
Executes given callable on internal system thread pool asynchronously.
|
void |
readExternal(ObjectInput in) |
IgniteFuture<?> |
runLocal(Runnable r)
Executes given closure on internal system thread pool asynchronously.
|
<R> SchedulerFuture<R> |
scheduleLocal(Callable<R> job,
String ptrn)
Schedules job for execution using local cron-based scheduling.
|
SchedulerFuture<?> |
scheduleLocal(Runnable job,
String ptrn)
Schedules job for execution using local cron-based scheduling.
|
void |
writeExternal(ObjectOutput out) |
public IgniteSchedulerImpl()
Externalizable
.public IgniteSchedulerImpl(GridKernalContext ctx)
ctx
- Kernal context.public IgniteFuture<?> runLocal(Runnable r)
Note that class IgniteRunnable
implements Runnable
and class IgniteOutClosure
implements Callable
interface.
runLocal
in interface IgniteScheduler
r
- Runnable to execute. If null
- this method is no-op.IgniteScheduler.callLocal(Callable)
,
IgniteClosure
public <R> IgniteFuture<R> callLocal(Callable<R> c)
Note that class IgniteRunnable
implements Runnable
and class IgniteOutClosure
implements Callable
interface.
callLocal
in interface IgniteScheduler
R
- Type of the return value for the closure.c
- Callable to execute. If null
- this method is no-op.IgniteScheduler.runLocal(Runnable)
,
IgniteOutClosure
public SchedulerFuture<?> scheduleLocal(Runnable job, String ptrn)
scheduleLocal
in interface IgniteScheduler
job
- 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> SchedulerFuture<R> scheduleLocal(Callable<R> job, String ptrn)
scheduleLocal
in interface IgniteScheduler
job
- 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.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0.final Release Date : December 29 2015