object Accumulator
- Source
- Accumulator.scala
- Alphabetic
- By Inheritance
- Accumulator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[E, A](sink: Sink[E, Future[A]]): Accumulator[E, A]
Create a new accumulator from the given Sink.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def done[A](a: Future[A]): Accumulator[Any, A]
Create a done accumulator.
Create a done accumulator.
The underlying sink will cancel as soon as its onSubscribe method is called, and the materialized value will be the passed in future.
- def done[A](a: A): Accumulator[Any, A]
Create a done accumulator.
Create a done accumulator.
The underlying sink will cancel as soon as its onSubscribe method is called, and the materialized value will be an immediately available future of
a
. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def flatten[E, A](future: Future[Accumulator[E, A]])(implicit materializer: Materializer): Accumulator[E, A]
Flatten a future of an accumulator to an accumulator.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def source[E]: Accumulator[E, Source[E, _]]
Create an accumulator that forwards the stream fed into it to the source it produces.
Create an accumulator that forwards the stream fed into it to the source it produces.
This is useful for when you want to send the consumed stream to another API that takes a Source as input.
Extreme care must be taken when using this accumulator - the source *must always* be materialized and consumed. If it isn't, this could lead to resource leaks and deadlocks upstream.
- returns
An accumulator that forwards the stream to the produced source.
- def strict[E, A](strictHandler: (Option[E]) => Future[A], toSink: Sink[E, Future[A]]): Accumulator[E, A]
Create an accumulator that is capable of handling the stream as a single, possibly empty, element, with a sink provided as a fallback if the stream can't be expressed as a single element.
Create an accumulator that is capable of handling the stream as a single, possibly empty, element, with a sink provided as a fallback if the stream can't be expressed as a single element.
This is intended to be able to be used to avoid a stream materialization for strict entities.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)