monix.execution.cancelables

CompositeCancelable

final class CompositeCancelable extends BooleanCancelable

Represents a composite of multiple cancelables. In case it is canceled, all contained cancelables will be canceled too, e.g...

val s = CompositeCancelable()

s += c1
s += c2
s += c3

// c1, c2, c3 will also be canceled
s.cancel()

Additionally, once canceled, on appending of new cancelable references, those references will automatically get canceled too:

val s = CompositeCancelable()
s.cancel()

// c1 gets canceled, because s is already canceled
s += c1
// c2 gets canceled, because s is already canceled
s += c2

Adding and removing references from this composite is thread-safe.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CompositeCancelable
  2. BooleanCancelable
  3. Cancelable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +=(other: Cancelable): CompositeCancelable.this.type

    Adds a cancelable reference to this composite.

    Adds a cancelable reference to this composite.

    If this cancelable is already canceled, then the given reference will be canceled as well.

    Annotations
    @tailrec()
  5. def -=(s: Cancelable): Unit

    Removes a cancelable reference from this composite.

    Removes a cancelable reference from this composite. Alias for remove.

  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def cancel(): Unit

    Cancels the unit of work represented by this reference.

    Cancels the unit of work represented by this reference.

    Guaranteed idempotency - calling it multiple times should have the same side-effect as calling it only once. Implementations of this method should also be thread-safe.

    Definition Classes
    CompositeCancelableCancelable
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def isCanceled: Boolean

    returns

    true in case this cancelable hasn't been canceled, or false otherwise.

    Definition Classes
    CompositeCancelableBooleanCancelable
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def remove(s: Cancelable): Unit

    Removes a cancelable reference from this composite.

    Removes a cancelable reference from this composite.

    Annotations
    @tailrec()
  22. def reset(): Unit

    Resets this composite to an empty state, if not canceled, otherwise leaves it in the canceled state.

    Resets this composite to an empty state, if not canceled, otherwise leaves it in the canceled state.

    Annotations
    @tailrec()
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BooleanCancelable

Inherited from Cancelable

Inherited from AnyRef

Inherited from Any

Ungrouped