object SourceExt extends SourceExt
- Source
- SourceExt.scala
- Alphabetic
- By Inheritance
- SourceExt
- 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)
- Definition Classes
- SourceExt
-
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)
- Definition Classes
- SourceExt
-
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)
- Definition Classes
- SourceExt
-
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)
- Definition Classes
- SourceExt
-
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.
Create an infinite source of the same Lazy value evaluated only when the stream is materialized.
- Definition Classes
- SourceExt
-
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.
Create an infinite source of the same Async Lazy value evaluated only when the stream is materialized.
- Definition Classes
- SourceExt
-
val
defaultChunkSize: Int
- Definition Classes
- SourceExt
-
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
- Definition Classes
- SourceExt
-
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).
- Definition Classes
- SourceExt
-
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).
- Definition Classes
- SourceExt
-
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
- Definition Classes
- SourceExt
-
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.
Create a source from a Lazy Value that will be evaluated only when the stream is materialized.
- Definition Classes
- SourceExt
-
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.
Create a source from a Lazy Async value that will be evaluated only when the stream is materialized.
- Definition Classes
- SourceExt
-
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.
- Definition Classes
- SourceExt
- Annotations
- @deprecated
- Deprecated
(Since version Source now support unfoldAsync) Since 0.11.0