Packages

object Callback

Source
Callback.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Callback
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class Builders[E] extends AnyVal

    Functions exposed via apply.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[E]: Builders[E]

    For building Callback objects using the Partially-Applied Type technique.

    For building Callback objects using the Partially-Applied Type technique.

    For example these are Equivalent:

    Callback[Throwable, Throwable].empty[String] <-> Callback.empty[Throwable, String]

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def empty[E, A](implicit r: UncaughtExceptionReporter): Callback[E, A]

    Creates an empty Callback, a callback that doesn't do anything in onNext and that logs errors in onError with the provided monix.execution.UncaughtExceptionReporter.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def forked[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A]

    Given a Callback wraps it into an implementation that calls onSuccess and onError asynchronously, using the given scala.concurrent.ExecutionContext.

    Given a Callback wraps it into an implementation that calls onSuccess and onError asynchronously, using the given scala.concurrent.ExecutionContext.

    The async boundary created is "light", in the sense that a TrampolinedRunnable is used and supporting schedulers can execute these using an internal trampoline, thus execution being faster and immediate, but still avoiding growing the call-stack and thus avoiding stack overflows.

    THREAD-SAFETY: the returned callback is thread-safe.

    In case onSuccess and onError get called multiple times, from multiple threads even, the implementation protects against access violations and throws a CallbackCalledMultipleTimesException.

    See also

    Callback.trampolined

  11. def fromAttempt[E, A](cb: (Either[E, A]) => Unit): Callback[E, A]

    Turns Either[Throwable, A] => Unit callbacks into Monix callbacks.

    Turns Either[Throwable, A] => Unit callbacks into Monix callbacks.

    These are common within Cats' implementation, used for example in cats.effect.IO.

    WARNING: the returned callback is NOT thread-safe!

  12. def fromPromise[A](p: Promise[A]): Callback[Throwable, A]

    Returns a Callback instance that will complete the given promise.

    Returns a Callback instance that will complete the given promise.

    THREAD-SAFETY: the provided instance is thread-safe by virtue of Promise being thread-safe.

  13. def fromTry[A](cb: (Try[A]) => Unit): Callback[Throwable, A]

    Turns Try[A] => Unit callbacks into Monix callbacks.

    Turns Try[A] => Unit callbacks into Monix callbacks.

    These are common within Scala's standard library implementation, due to usage with Scala's Future.

    WARNING: the returned callback is NOT thread-safe!

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def safe[E, A](cb: Callback[E, A])(implicit r: UncaughtExceptionReporter): Callback[E, A]

    Wraps any Callback into a safer implementation that protects against protocol violations (e.g.

    Wraps any Callback into a safer implementation that protects against protocol violations (e.g. onSuccess or onError must be called at most once).

    THREAD-SAFETY: the returned callback is thread-safe.

    In case onSuccess and onError get called multiple times, from multiple threads even, the implementation protects against access violations and throws a CallbackCalledMultipleTimesException.

  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. def trampolined[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A]

    Given a Callback wraps it into an implementation that calls onSuccess and onError asynchronously, using the given scala.concurrent.ExecutionContext.

    Given a Callback wraps it into an implementation that calls onSuccess and onError asynchronously, using the given scala.concurrent.ExecutionContext.

    The async boundary created is "light", in the sense that a TrampolinedRunnable is used and supporting schedulers can execute these using an internal trampoline, thus execution being faster and immediate, but still avoiding growing the call-stack and thus avoiding stack overflows.

    THREAD-SAFETY: the returned callback is thread-safe.

    In case onSuccess and onError get called multiple times, from multiple threads even, the implementation protects against access violations and throws a CallbackCalledMultipleTimesException.

    See also

    forked

  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped