| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrx.Scheduler
rx.concurrency.ExecutorScheduler
public class ExecutorScheduler
A Scheduler implementation that uses an Executor or ScheduledExecutorService implementation.
 
 Note that if an Executor implementation is used instead of ScheduledExecutorService then a system-wide Timer will be used to handle delayed events.
| Constructor Summary | |
|---|---|
| ExecutorScheduler(java.util.concurrent.Executor executor) | |
| ExecutorScheduler(java.util.concurrent.ScheduledExecutorService executor) | |
| Method Summary | ||
|---|---|---|
| 
 | schedule(T state,
         Func2<Scheduler,T,Subscription> action)Schedules a cancelable action to be executed. | |
| 
 | schedule(T state,
         Func2<Scheduler,T,Subscription> action,
         long delayTime,
         java.util.concurrent.TimeUnit unit)Schedules a cancelable action to be executed in delayTime. | |
| 
 | schedulePeriodically(T state,
                     Func2<Scheduler,T,Subscription> action,
                     long initialDelay,
                     long period,
                     java.util.concurrent.TimeUnit unit)Schedules a cancelable action to be executed periodically. | |
| Methods inherited from class rx.Scheduler | 
|---|
| now, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedulePeriodically, schedulePeriodically, schedulePeriodically | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ExecutorScheduler(java.util.concurrent.Executor executor)
public ExecutorScheduler(java.util.concurrent.ScheduledExecutorService executor)
| Method Detail | 
|---|
public <T> Subscription schedulePeriodically(T state,
                                             Func2<Scheduler,T,Subscription> action,
                                             long initialDelay,
                                             long period,
                                             java.util.concurrent.TimeUnit unit)
Scheduler
schedulePeriodically in class Schedulerstate - State to pass into the action.action - The action to execute periodically.initialDelay - Time to wait before executing the action for the first time.period - The time interval to wait each time in between executing the action.unit - The time unit the interval above is given in.
public <T> Subscription schedule(T state,
                                 Func2<Scheduler,T,Subscription> action,
                                 long delayTime,
                                 java.util.concurrent.TimeUnit unit)
Scheduler
schedule in class Schedulerstate - State to pass into the action.action - Action to schedule.delayTime - Time the action is to be delayed before executing.unit - Time unit of the delay time.
public <T> Subscription schedule(T state,
                                 Func2<Scheduler,T,Subscription> action)
Scheduler
schedule in class Schedulerstate - State to pass into the action.action - Action to schedule.
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||