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
-
def
isSynchronous: Boolean
Returns
true
if self is a direct reference toContinue
orStop
,false
otherwise. - val source: Self
-
def
syncFlatMap(f: (Ack) ⇒ Future[Ack])(implicit r: UncaughtExceptionReporter): 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 without any hard asynchronous boundaries — in case the
source
is anAck
value (e.g.Continue
orStop
) then execution will be immediate, otherwise execution will be trampolined (being execute on Monix'sTrampolineExecutionContext
).WARN: in case the source is an
Ack
value (e.g.Continue
orStop
) and the execution being immediate, with no async boundaries, this means that application of this function is *stack unsafe*!Use with great care as an optimization. Don't use it in tail-recursive loops!
- f
is the mapping function used to transform the source
- r
is an exception reporter used for reporting errors triggered by
f
-
def
syncMap(f: (Ack) ⇒ Ack)(implicit r: UncaughtExceptionReporter): 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 without any hard asynchronous boundaries — in case the
source
is anAck
value (e.g.Continue
orStop
) then execution will be immediate, otherwise execution will be trampolined (being execute on Monix'sTrampolineExecutionContext
).WARN: in case the source is an
Ack
value (e.g.Continue
orStop
) and the execution being immediate, with no async boundaries, this means that application of this function is *stack unsafe*!Use with great care as an optimization. Don't use it in tail-recursive loops!
- f
is the mapping function used to transform the source
- r
is an exception reporter used for reporting errors triggered by
f
-
def
syncOnComplete(f: (Try[Ack]) ⇒ Unit)(implicit r: UncaughtExceptionReporter): 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 without any hard asynchronous boundaries — in case the
source
is anAck
value (e.g.Continue
orStop
) then execution will be immediate, otherwise execution will be trampolined (being execute on Monix'sTrampolineExecutionContext
).WARN: in case the source is an
Ack
value (e.g.Continue
orStop
) and the execution being immediate, with no async boundaries, this means that application of this function is *stack unsafe*!Use with great care as an optimization. Don't use it in tail-recursive loops!
- r
is a reporter for exceptions thrown by
f
-
def
syncOnContinue(thunk: ⇒ Unit)(implicit r: UncaughtExceptionReporter): Self
Executes the given
callback
onContinue
.Executes the given
callback
onContinue
.Execution will happen without any hard asynchronous boundaries — in case the
source
is anAck
value (e.g.Continue
orStop
) then execution will be immediate, otherwise execution will be trampolined (being execute on Monix'sTrampolineExecutionContext
).WARN: in case the source is an
Ack
value (e.g.Continue
orStop
) and the execution being immediate, with no async boundaries, this means that application of this function is *stack unsafe*!Use with great care as an optimization. Don't use it in tail-recursive loops!
- r
is an exception reporter used for reporting errors triggered by
thunk
-
def
syncOnContinueFollow[A](p: Promise[A], value: A): Self
If the source completes with a
Stop
, then complete the given promise with a value. -
def
syncOnStopFollow[A](p: Promise[A], value: A): Self
If the source completes with a
Stop
, then complete the given promise with a value. -
def
syncOnStopOrFailure(cb: (Option[Throwable]) ⇒ Unit)(implicit r: UncaughtExceptionReporter): Self
Executes the given
callback
onStop
or onFailure(ex)
.Executes the given
callback
onStop
or onFailure(ex)
.Execution will happen without any hard asynchronous boundaries — in case the
source
is anAck
value (e.g.Continue
orStop
) then execution will be immediate, otherwise execution will be trampolined (being execute on Monix'sTrampolineExecutionContext
).WARN: in case the source is an
Ack
value (e.g.Continue
orStop
) and the execution being immediate, with no async boundaries, this means that application of this function is *stack unsafe*!Use with great care as an optimization. Don't use it in tail-recursive loops!
- r
is an exception reporter used for reporting errors triggered by
cb
-
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