RxJava



rx.concurrency
Class ImmediateScheduler

java.lang.Object
  extended by rx.Scheduler
      extended by rx.concurrency.ImmediateScheduler

public final class ImmediateScheduler
extends Scheduler

Executes work immediately on the current thread.


Method Summary
static ImmediateScheduler getInstance()
           
<T> Subscription
schedule(T state, Func2<? super Scheduler,? super T,? extends Subscription> action)
          Schedules a cancelable action to be executed.
<T> Subscription
schedule(T state, Func2<? super Scheduler,? super T,? extends Subscription> action, long dueTime, java.util.concurrent.TimeUnit unit)
          Schedules a cancelable action to be executed in delayTime.
 
Methods inherited from class rx.Scheduler
degreeOfParallelism, now, schedule, schedule, schedule, schedulePeriodically, schedulePeriodically
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ImmediateScheduler getInstance()

schedule

public <T> Subscription schedule(T state,
                                 Func2<? super Scheduler,? super T,? extends Subscription> action)
Description copied from class: Scheduler
Schedules a cancelable action to be executed.

Specified by:
schedule in class Scheduler
Parameters:
state - State to pass into the action.
action - Action to schedule.
Returns:
a subscription to be able to unsubscribe from action.

schedule

public <T> Subscription schedule(T state,
                                 Func2<? super Scheduler,? super T,? extends Subscription> action,
                                 long dueTime,
                                 java.util.concurrent.TimeUnit unit)
Description copied from class: Scheduler
Schedules a cancelable action to be executed in delayTime.

Specified by:
schedule in class Scheduler
Parameters:
state - State to pass into the action.
action - Action to schedule.
dueTime - Time the action is to be delayed before executing.
unit - Time unit of the delay time.
Returns:
a subscription to be able to unsubscribe from action.