public class NewThreadWorker extends Scheduler.Worker implements Subscription
| Constructor and Description |
|---|
NewThreadWorker(java.util.concurrent.ThreadFactory threadFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
Subscription |
schedule(Action0 action)
Schedules an Action for execution.
|
Subscription |
schedule(Action0 action,
long delayTime,
java.util.concurrent.TimeUnit unit)
Schedules an Action for execution at some point in the future.
|
ScheduledAction |
scheduleActual(Action0 action,
long delayTime,
java.util.concurrent.TimeUnit unit) |
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription
was received. |
now, schedulePeriodicallypublic NewThreadWorker(java.util.concurrent.ThreadFactory threadFactory)
public Subscription schedule(Action0 action)
Scheduler.Workerschedule in class Scheduler.Workeraction - Action to schedulepublic Subscription schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Scheduler.Worker
Note to implementors: non-positive delayTime should be regarded as undelayed schedule, i.e.,
as if the Scheduler.Worker.schedule(rx.functions.Action0) was called.
schedule in class Scheduler.Workeraction - the Action to scheduledelayTime - time to wait before executing the action; non-positive values indicate an undelayed
scheduleunit - the time unit of delayTimepublic ScheduledAction scheduleActual(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
action - delayTime - unit - public void unsubscribe()
SubscriptionSubscriber that was registered when this Subscription
was received.
This allows unregistering an Subscriber before it has finished receiving all events (i.e. before
onCompleted is called).
unsubscribe in interface Subscriptionpublic boolean isUnsubscribed()
SubscriptionSubscription is currently unsubscribed.isUnsubscribed in interface Subscriptiontrue if this Subscription is currently unsubscribed, false otherwise