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

All Methods Instance Methods Concrete Methods
`<R> IgniteFuture<R>` `callLocal(@NotNull Callable<R> c)` Executes given callable on internal system thread pool asynchronously.
`void` `readExternal(ObjectInput in)`
`IgniteFuture<?>` `runLocal(@NotNull Runnable r)` Executes given closure on internal system thread pool asynchronously.
`Closeable` `runLocal(@NotNull Runnable r, long delay, TimeUnit timeUnit)` Executes given closure after the delay.
`<R> SchedulerFuture<R>` `scheduleLocal(@NotNull Callable<R> job, String ptrn)` Schedules job for execution using local cron-based scheduling.
`SchedulerFuture<?>` `scheduleLocal(@NotNull 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(@NotNull
                                    @NotNull 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` - Not null runnable to execute.
Returns:
  Future for this execution.
See Also:
  `IgniteScheduler.callLocal(Callable)`, `IgniteClosure`

#### runLocal

    public Closeable runLocal(@NotNull
                              @NotNull Runnable r,
                              long delay,
                              TimeUnit timeUnit)

Executes given closure after the delay.

Note that class `IgniteRunnable` implements `Runnable`

Specified by:
  `runLocal` in interface `IgniteScheduler`
Parameters:
  `r` - Not null runnable to execute.
  `delay` - Initial delay.
  `timeUnit` - Time granularity.
Returns:
  java.io.Closeable which can be used to cancel execution.

#### callLocal

    public <R> IgniteFuture<R> callLocal(@NotNull
                                         @NotNull 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` - Not null callable to execute.
Returns:
  Future for this execution.
See Also:
  `IgniteScheduler.runLocal(Runnable)`, `IgniteOutClosure`

#### scheduleLocal

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

Schedules job for execution using local cron-based scheduling.

Specified by:
  `scheduleLocal` in interface `IgniteScheduler`
Parameters:
  `job` - Not null 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.

#### scheduleLocal

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

Schedules job for execution using local cron-based scheduling.

Specified by:
  `scheduleLocal` in interface `IgniteScheduler`
Type Parameters:
  `R` - Type of the job result.
Parameters:
  `job` - Not null 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`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022