Package rx.internal.schedulers
Class ScheduledAction.FutureCompleter
- java.lang.Object
-
- rx.internal.schedulers.ScheduledAction.FutureCompleter
-
- All Implemented Interfaces:
Subscription
- Enclosing class:
- ScheduledAction
final class ScheduledAction.FutureCompleter extends java.lang.Object implements Subscription
Cancels the captured future if the caller of the call method is not the same as the runner of the outer ScheduledAction to prevent unnecessary self-interrupting if the unsubscription happens from the same thread.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.Future<?>f
-
Constructor Summary
Constructors Constructor Description FutureCompleter(java.util.concurrent.Future<?> f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisUnsubscribed()Indicates whether thisSubscriptionis currently unsubscribed.voidunsubscribe()Stops the receipt of notifications on theSubscriberthat was registered when this Subscription was received.
-
-
-
Method Detail
-
unsubscribe
public void unsubscribe()
Description copied from interface:SubscriptionStops the receipt of notifications on theSubscriberthat was registered when this Subscription was received.This allows unregistering an
Subscriberbefore it has finished receiving all events (i.e. before onCompleted is called).- Specified by:
unsubscribein interfaceSubscription
-
isUnsubscribed
public boolean isUnsubscribed()
Description copied from interface:SubscriptionIndicates whether thisSubscriptionis currently unsubscribed.- Specified by:
isUnsubscribedin interfaceSubscription- Returns:
trueif thisSubscriptionis currently unsubscribed,falseotherwise
-
-