com.fsist.util.concurrent

AsyncFunc

Related Docs: object AsyncFunc | package concurrent

trait AsyncFunc[-A, +B] extends Func[A, B]

The asynchronous case of Func.

Linear Supertypes
Func[A, B], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AsyncFunc
  2. Func
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(a: A)(implicit ec: ExecutionContext): Future[B]

    The core abstract method that must be implemented by each instance, providing the function behavior.

Concrete 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 asAsync: AsyncFunc[A, B]

    Shortcut for a cast to AsyncFunc.

    Shortcut for a cast to AsyncFunc. Fails at runtime with ClassCastException if this function is synchronous.

    Definition Classes
    Func
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def asSync: SyncFunc[A, B]

    Shortcut for a cast to SyncFunc.

    Shortcut for a cast to SyncFunc. Fails at runtime with ClassCastException if this function is asynchronous.

    Definition Classes
    Func
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def compose[C](next: Func[B, C])(implicit ec: ExecutionContext): Func[A, C]

    Creates a new function composing these two, which is synchronous iff both inputs were synchronous.

    Creates a new function composing these two, which is synchronous iff both inputs were synchronous.

    Definition Classes
    AsyncFuncFunc
  9. def composeFailure(handler: (Throwable) ⇒ Unit)(implicit ec: ExecutionContext): Func[A, B]

    Returns a new function that passes any exceptions in the original function to handler.

    Returns a new function that passes any exceptions in the original function to handler. The new function still fails with the original exception after the handler has run.

    The returned Func is synchronous iff the original func is synchronous.

    Definition Classes
    Func
  10. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def isNop: Boolean

    Returns true iff this function is either Func.nop or Func.nopAsync.

    Returns true iff this function is either Func.nop or Func.nopAsync.

    Definition Classes
    Func
  17. def isPass: Boolean

    Returns true iff this is a function built by Func.pass.

    Returns true iff this is a function built by Func.pass.

    Definition Classes
    Func
  18. def isSync: Boolean

    Returns true iff this is a SyncFunc

    Returns true iff this is a SyncFunc

    Definition Classes
    AsyncFuncFunc
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  22. def recover[U >: B](handler: PartialFunction[Throwable, U])(implicit ec: ExecutionContext): Func[A, U]

    Adds a synchronous recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.

    Adds a synchronous recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.

    If this is a SyncFunc, the result will also be synchronous.

    Definition Classes
    AsyncFuncFunc
  23. def recoverWith[U >: B](handler: PartialFunction[Throwable, Future[U]])(implicit ec: ExecutionContext): AsyncFunc[A, U]

    Adds an asynchronous recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.

    Adds an asynchronous recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.

    This isn't declared to return an AsyncFunc because it can discard the handler and return a SyncFunc if the original function is e.g. nop or pass.

    Definition Classes
    AsyncFuncFunc
  24. def someApply(a: A)(implicit ec: ExecutionContext): Future[B]

    Returns either B or a Future[B] depending on the type of this Func.

    Returns either B or a Future[B] depending on the type of this Func.

    Definition Classes
    AsyncFuncFunc
  25. def someRecover[U >: B](handler: Func[Throwable, U])(implicit ec: ExecutionContext): Func[A, U]

    Adds a recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.

    Adds a recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.

    If this and handler are both synchronous, then the result will also be synchronous.

    Because the handler is a Func, it cannot be a partial function; it must handle all NonFatal exceptions. Exceptions that don't match the NonFatal extractor will not be passed to the handler.

    Definition Classes
    Func
  26. def suppressErrors()(implicit ec: ExecutionContext): Func[A, Unit]

    Suppress all errors matched by the NonFatal extractor.

    Suppress all errors matched by the NonFatal extractor. If this is synchronous, the result is also synchronous.

    Definition Classes
    AsyncFuncFunc
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def ~>[C](next: Func[B, C])(implicit ec: ExecutionContext): Func[A, C]

    Alias for compose.

    Alias for compose. Creates a new function composing these two, which is synchronous iff both inputs were synchronous.

    Definition Classes
    Func

Inherited from Func[A, B]

Inherited from AnyRef

Inherited from Any

Ungrouped