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
true
if self is a direct reference toContinue
orStop
,false
otherwise. - 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
flatMap
operation applied to the source.Given a mapping function, returns a new future reference that is the result of a
flatMap
operation applied to the source.Execution will happen synchronously if the
source
value is a direct reference toContinue
orStop
, 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
map
operation applied to the source.Given a mapping function, returns a new future reference that is the result of a
map
operation applied to the source.Execution will happen synchronously if the
source
value is a direct reference toContinue
orStop
, 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
source
value is a direct reference toContinue
orStop
, or asynchronously otherwise. -
macro
def
syncOnContinue(callback: ⇒ Unit)(implicit s: Scheduler): Self
Executes the given
callback
onContinue
.Executes the given
callback
onContinue
.Execution will happen synchronously if the
source
value is a direct reference toContinue
orStop
, or asynchronously otherwise. -
def
syncOnContinueFollow[T](p: Promise[T], value: T)(implicit s: Scheduler): Self
If the source completes with a
Stop
, then complete the given promise with a value. -
def
syncOnStopFollow[T](p: Promise[T], value: T)(implicit s: Scheduler): Self
If the source completes with a
Stop
, then complete the given promise with a value. -
macro
def
syncOnStopOrFailure(callback: ⇒ Unit)(implicit s: Scheduler): Self
Executes the given
callback
onStop
or onFailure(ex)
.Executes the given
callback
onStop
or onFailure(ex)
.Execution will happen synchronously if the
source
value is a direct reference toContinue
orStop
, or asynchronously otherwise. -
def
syncTryFlatten(implicit r: UncaughtExceptionReporter): Future[Ack]
Tries converting an already completed
Future[Ack]
into a direct reference toContinue
orStop
.Tries converting an already completed
Future[Ack]
into a direct reference toContinue
orStop
. Useful for collapsing async pipelines. -
def
toString(): String
- Definition Classes
- Any