implicit final class AckExtensions[Self <: Future[Ack]] extends AnyVal
Helpers for dealing with synchronous Future[Ack] results,
powered by macros.
- Alphabetic
- By Inheritance
- AckExtensions
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AckExtensions(source: Self)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
macro
def
isSynchronous: Boolean
Returns
trueif self is a direct reference toContinueorStop,falseotherwise. - val source: Self
-
macro
def
syncFlatMap(f: (Ack) ⇒ Future[Ack])(implicit s: Scheduler): Future[Ack]
Given a mapping function, returns a new future reference that is the result of a
flatMapoperation applied to the source.Given a mapping function, returns a new future reference that is the result of a
flatMapoperation applied to the source.Execution will happen synchronously if the
sourcevalue is a direct reference toContinueorStop, or asynchronously otherwise. -
macro
def
syncMap(f: (Ack) ⇒ Ack)(implicit s: Scheduler): Future[Ack]
Given a mapping function, returns a new future reference that is the result of a
mapoperation applied to the source.Given a mapping function, returns a new future reference that is the result of a
mapoperation applied to the source.Execution will happen synchronously if the
sourcevalue is a direct reference toContinueorStop, or asynchronously otherwise. -
macro
def
syncOnComplete(f: (Try[Ack]) ⇒ Unit)(implicit s: Scheduler): Unit
When the source future is completed, either through an exception, or a value, apply the provided function.
When the source future is completed, either through an exception, or a value, apply the provided function.
Execution will happen synchronously if the
sourcevalue is a direct reference toContinueorStop, or asynchronously otherwise. -
macro
def
syncOnContinue(callback: ⇒ Unit)(implicit s: Scheduler): Self
Executes the given
callbackonContinue.Executes the given
callbackonContinue.Execution will happen synchronously if the
sourcevalue is a direct reference toContinueorStop, or asynchronously otherwise. -
def
syncOnContinueFollow[A](p: Promise[A], value: A)(implicit s: Scheduler): Self
If the source completes with a
Stop, then complete the given promise with a value. -
def
syncOnStopFollow[A](p: Promise[A], value: A)(implicit s: Scheduler): Self
If the source completes with a
Stop, then complete the given promise with a value. -
macro
def
syncOnStopOrFailure(callback: (Option[Throwable]) ⇒ Unit)(implicit s: Scheduler): Self
Executes the given
callbackonStopor onFailure(ex).Executes the given
callbackonStopor onFailure(ex).Execution will happen synchronously if the
sourcevalue is a direct reference toContinueorStop, or asynchronously otherwise. -
def
syncTryFlatten(implicit r: UncaughtExceptionReporter): Future[Ack]
Tries converting an already completed
Future[Ack]into a direct reference toContinueorStop.Tries converting an already completed
Future[Ack]into a direct reference toContinueorStop. Useful for collapsing async pipelines. -
def
toString(): String
- Definition Classes
- Any