trait SourceExt extends AnyRef
- Alphabetic
- By Inheritance
- SourceExt
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bulkPullerAsync[A](offset: Long)(f: (Long, Int) ⇒ Future[(Seq[A], Boolean)]): Source[A, ActorRef]
Create a source that calls the f function each time that downstream requests more elements.
Create a source that calls the f function each time that downstream requests more elements.
- offset
initial offset
- f
pulling function that takes as first argument (offset + nb of already pushed elements into downstream) and as second argument the maximum number of elements that can be currently pushed downstream. Returns a sequence of elements to push, and a stop boolean (true means that this is the end of the stream)
-
def
bulkPullerAsyncWithErrorExpBackoff[A](offset: Long, maxRetryDuration: FiniteDuration, retryMinInterval: FiniteDuration)(f: (Long, Int) ⇒ Future[(Seq[A], Boolean)]): Source[A, ActorRef]
Create a source that calls the f function each time that downstream requests more elements and in case of error in the Future, it calls your continuation error function (true to continue, false to stop).
Create a source that calls the f function each time that downstream requests more elements and in case of error in the Future, it calls your continuation error function (true to continue, false to stop).
- offset
initial offset
- f
pulling function that takes as first argument (offset + nb of already pushed elements into downstream) and as second argument the maximum number of elements that can be currently pushed downstream. Returns a sequence of elements to push, and a stop boolean (true means that this is the end of the stream)
-
def
bulkPullerAsyncWithErrorMgt[A](offset: Long)(f: (Long, Int) ⇒ Future[(Seq[A], Boolean)], stopOnErr: (Throwable, Int) ⇒ Boolean): Source[A, ActorRef]
Create a source that calls the f function each time that downstream requests more elements and in case of error in the Future, it calls your continuation error function (true to continue, false to stop).
Create a source that calls the f function each time that downstream requests more elements and in case of error in the Future, it calls your continuation error function (true to continue, false to stop).
- offset
initial offset
- f
pulling function that takes as first argument (offset + nb of already pushed elements into downstream) and as second argument the maximum number of elements that can be currently pushed downstream. Returns a sequence of elements to push, and a stop boolean (true means that this is the end of the stream)
- stopOnErr
stop on error function called in case of error in the future returned by the pulling function f (return true to stop the stream in failure & false to ignore the error and continue)
-
def
bulkPullerAsyncWithMaxRetries[A](offset: Long, maxRetries: Int)(f: (Long, Int) ⇒ Future[(Seq[A], Boolean)]): Source[A, ActorRef]
Create a source that calls the f function each time that downstream requests more elements and retries a max number of times in case of errors.
Create a source that calls the f function each time that downstream requests more elements and retries a max number of times in case of errors.
- offset
initial offset
- maxRetries
maximum number of retries in case of error in the future returned by the pulling function f
- f
pulling function that takes as first argument (offset + nb of already pushed elements into downstream) and as second argument the maximum number of elements that can be currently pushed downstream. Returns a sequence of elements to push, and a stop boolean (true means that this is the end of the stream)
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
constantLazy[A](a: ⇒ A): Source[A, ActorRef]
Create an infinite source of the same Lazy value evaluated only when the stream is materialized.
-
def
constantLazyAsync[A](fut: ⇒ Future[A]): Source[A, ActorRef]
Create an infinite source of the same Async Lazy value evaluated only when the stream is materialized.
- val defaultChunkSize: Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromFile(f: File, maxChunkSize: Int = defaultChunkSize): Source[ByteString, Future[IOResult]]
Create a Source from a File.
Create a Source from a File.
- f
file
- maxChunkSize
max size of stream chunks in bytes
-
def
fromGZIPFile(f: File, maxChunkSize: Int = defaultChunkSize): Source[ByteString, Future[IOResult]]
Create a Source from a zip File and unzip it on the fly.
Create a Source from a zip File and unzip it on the fly. Note: Akka Stream RC1 introduced a built-in way to create a Source from an InputStream, therefore this version is deprecated.
- f
file
- maxChunkSize
max size of the chunks that the source will emit (in bytes).
-
def
fromGZIPStream(is: InputStream, maxChunkSize: Int = defaultChunkSize): Source[ByteString, Future[IOResult]]
Create a Source from a zipped input stream and unzip it on the fly.
Create a Source from a zipped input stream and unzip it on the fly.
- is
source input stream
- maxChunkSize
max size of the chunks that the source will emit (in bytes).
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
seededLazyAsync[A, B, M](futB: ⇒ Future[B])(f: (B) ⇒ Source[A, M]): Source[A, NotUsed]
Create a source from the result of a Future redeemed when the stream is materialized.
Create a source from the result of a Future redeemed when the stream is materialized.
- futB
the future seed
- f
the function producing the source from the seed
-
def
singleLazy[A](a: ⇒ A): Source[A, NotUsed]
Create a source from a Lazy Value that will be evaluated only when the stream is materialized.
-
def
singleLazyAsync[A](fut: ⇒ Future[A]): Source[A, NotUsed]
Create a source from a Lazy Async value that will be evaluated only when the stream is materialized.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
unfoldPullerAsync[A, B](zero: ⇒ B)(f: (B) ⇒ Future[(Option[A], Option[B])]): Source[A, ActorRef]
Create a source that calls the f function each time that downstream requests more elements.
Create a source that calls the f function each time that downstream requests more elements.
- f
pulling unfold function that takes a state B and produce optionally an element to push to downstream. It produces a new state b if we want the stream to continue or no new state if we want the stream to end.
- Annotations
- @deprecated
- Deprecated
(Since version Source now support unfoldAsync) Since 0.11.0