org.apache.ignite.internal

## Class IgniteSchedulerImpl

- java.lang.Object
- - org.apache.ignite.internal.IgniteSchedulerImpl

All Implemented Interfaces:
  Externalizable, Serializable, IgniteScheduler

    public class IgniteSchedulerImpl
    extends Object
    implements IgniteScheduler, Externalizable

`IgniteScheduler` implementation.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgniteSchedulerImpl()` Required by `Externalizable`.
`IgniteSchedulerImpl(GridKernalContext ctx)`

### Method Summary

Methods
`<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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### IgniteSchedulerImpl

    public IgniteSchedulerImpl()

Required by `Externalizable`.

#### IgniteSchedulerImpl

    public IgniteSchedulerImpl(GridKernalContext ctx)

Parameters:
  `ctx` - Kernal context.

### Method Detail

#### runLocal

    public IgniteFuture<?> runLocal(Runnable r)

Executes given closure on internal system thread pool asynchronously.

Note that class `IgniteRunnable` implements `Runnable` and class `IgniteOutClosure` implements `Callable` interface.

Specified by:
  `runLocal` in interface `IgniteScheduler`
Parameters:
  `r` - Runnable to execute. If `null` - this method is no-op.
Returns:
  Future for this execution.
See Also:
  `IgniteScheduler.callLocal(Callable)`, `IgniteClosure`

#### callLocal

    public <R> IgniteFuture<R> callLocal(Callable<R> c)

Executes given callable on internal system thread pool asynchronously.

Note that class `IgniteRunnable` implements `Runnable` and class `IgniteOutClosure` implements `Callable` interface.

Specified by:
  `callLocal` in interface `IgniteScheduler`
Type Parameters:
  `R` - Type of the return value for the closure.
Parameters:
  `c` - Callable to execute. If `null` - this method is no-op.
Returns:
  Future for this execution.
See Also:
  `IgniteScheduler.runLocal(Runnable)`, `IgniteOutClosure`

#### scheduleLocal

    public SchedulerFuture<?> scheduleLocal(Runnable job,
                                   String ptrn)

Schedules job for execution using local cron-based scheduling.

Specified by:
  `scheduleLocal` in interface `IgniteScheduler`
Parameters:
  `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.
Returns:
  Scheduled execution future.

#### scheduleLocal

    public <R> SchedulerFuture<R> scheduleLocal(Callable<R> job,
                                       String ptrn)

Schedules job for execution using local cron-based scheduling.

Specified by:
  `scheduleLocal` in interface `IgniteScheduler`
Parameters:
  `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.
Returns:
  Scheduled execution future.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015