Object/Class

zio.stream

ZStream

Related Docs: class ZStream | package stream

Permalink

object ZStream extends ZStreamPlatformSpecificConstructors

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZStream
  2. ZStreamPlatformSpecificConstructors
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class AccessMPartiallyApplied[R] extends AnyVal

    Permalink
  2. final class AccessPartiallyApplied[R] extends AnyVal

    Permalink
  3. final class AccessStreamPartiallyApplied[R] extends AnyVal

    Permalink
  4. final class GroupBy[-R, +E, +K, +V] extends AnyRef

    Permalink

    Representation of a grouped stream.

    Representation of a grouped stream. This allows to filter which groups will be processed. Once this is applied all groups will be processed in parallel and the results will be merged in arbitrary order.

  5. final class ProvideSomeLayer[R0 <: Has[_], -R, +E, +A] extends AnyVal

    Permalink
  6. type Pull[-R, +E, +O] = ZIO[R, Option[E], Chunk[O]]

    Permalink
  7. type Take[+E, +A] = Exit[Option[E], Chunk[A]]

    Permalink
  8. sealed trait TerminationStrategy extends AnyRef

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final val DefaultChunkSize: Int(4096)

    Permalink

    The default chunk size used by the various combinators and constructors of ZStream.

  5. object Take

    Permalink
  6. object TerminationStrategy

    Permalink
  7. def absolve[R, E, O](xs: ZStream[R, E, Either[E, O]]): ZStream[R, E, O]

    Permalink

    Submerges the error case of an Either into the ZStream.

  8. def access[R]: AccessPartiallyApplied[R]

    Permalink

    Accesses the environment of the stream.

  9. def accessM[R]: AccessMPartiallyApplied[R]

    Permalink

    Accesses the environment of the stream in the context of an effect.

  10. def accessStream[R]: AccessStreamPartiallyApplied[R]

    Permalink

    Accesses the environment of the stream in the context of a stream.

  11. def apply[A](as: A*): ZStream[Any, Nothing, A]

    Permalink

    Creates a pure stream from a variable list of values

  12. def apply[R, E, O](process: ZManaged[R, Nothing, ZIO[R, Option[E], Chunk[O]]]): ZStream[R, E, O]

    Permalink

    Creates a new ZStream from a managed effect that yields chunks.

    Creates a new ZStream from a managed effect that yields chunks. The effect will be evaluated repeatedly until it fails with a None (to signify stream end) or a Some(E) (to signify stream failure).

    The stream evaluation guarantees proper acquisition and release of the ZManaged.

  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def bracket[R, E, A](acquire: ZIO[R, E, A])(release: (A) ⇒ ZIO[R, Nothing, Any]): ZStream[R, E, A]

    Permalink

    Creates a stream from a single value that will get cleaned up after the stream is consumed

  15. def bracketExit[R, E, A](acquire: ZIO[R, E, A])(release: (A, Exit[Any, Any]) ⇒ ZIO[R, Nothing, Any]): ZStream[R, E, A]

    Permalink

    Creates a stream from a single value that will get cleaned up after the stream is consumed

  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def concatAll[R, E, O](streams: Chunk[ZStream[R, E, O]]): ZStream[R, E, O]

    Permalink

    Concatenates all of the streams in the chunk to one stream.

  18. def crossN[R, E, A, B, C, D, F](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C], zStream4: ZStream[R, E, D])(f: (A, B, C, D) ⇒ F): ZStream[R, E, F]

    Permalink

    Composes the specified streams to create a cartesian product of elements with a specified function.

    Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.

    See also ZStream#zipN[R,E,A,B,C,D,F]* for the more common point-wise variant.

  19. def crossN[R, E, A, B, C, D](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C])(f: (A, B, C) ⇒ D): ZStream[R, E, D]

    Permalink

    Composes the specified streams to create a cartesian product of elements with a specified function.

    Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.

    See also ZStream#zipN[R,E,A,B,C,D]* for the more common point-wise variant.

  20. def crossN[R, E, A, B, C](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B])(f: (A, B) ⇒ C): ZStream[R, E, C]

    Permalink

    Composes the specified streams to create a cartesian product of elements with a specified function.

    Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent streams would be run multiple times, for every combination of elements in the prior streams.

    See also ZStream#zipN[R,E,A,B,C]* for the more common point-wise variant.

  21. def die(ex: ⇒ Throwable): ZStream[Any, Nothing, Nothing]

    Permalink

    The stream that dies with the ex.

  22. def dieMessage(msg: ⇒ String): ZStream[Any, Nothing, Nothing]

    Permalink

    The stream that dies with an exception described by msg.

  23. def done[E, A](exit: Exit[E, A]): ZStream[Any, E, A]

    Permalink

    The stream that ends with the zio.Exit value exit.

  24. val empty: ZStream[Any, Nothing, Nothing]

    Permalink

    The empty stream

  25. def environment[R]: ZStream[R, Nothing, R]

    Permalink

    Accesses the whole environment of the stream.

  26. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  28. def fail[E](error: ⇒ E): ZStream[Any, E, Nothing]

    Permalink

    The stream that always fails with the error

  29. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def finalizer[R](finalizer: ZIO[R, Nothing, Any]): ZStream[R, Nothing, Any]

    Permalink

    Creates a one-element stream that never fails and executes the finalizer when it ends.

  31. def fromChunk[O](c: ⇒ Chunk[O]): ZStream[Any, Nothing, O]

    Permalink

    Creates a stream from a zio.Chunk of values

    Creates a stream from a zio.Chunk of values

    c

    a chunk of values

    returns

    a finite stream of values

  32. def fromChunkQueue[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, Chunk[O]]): ZStream[R, E, O]

    Permalink

    Creates a stream from a zio.ZQueue of values

  33. def fromChunkQueueWithShutdown[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, Chunk[O]]): ZStream[R, E, O]

    Permalink

    Creates a stream from a zio.ZQueue of values.

    Creates a stream from a zio.ZQueue of values. The queue will be shutdown once the stream is closed.

  34. def fromChunks[O](cs: Chunk[O]*): ZStream[Any, Nothing, O]

    Permalink

    Creates a stream from an arbitrary number of chunks.

  35. def fromEffect[R, E, A](fa: ZIO[R, E, A]): ZStream[R, E, A]

    Permalink

    Creates a stream from an effect producing a value of type A

  36. def fromEffectOption[R, E, A](fa: ZIO[R, Option[E], A]): ZStream[R, E, A]

    Permalink

    Creates a stream from an effect producing a value of type A or an empty Stream

  37. def fromInputStream(is: ⇒ InputStream, chunkSize: Int = ZStream.DefaultChunkSize): ZStream[Any, IOException, Byte]

    Permalink

    Creates a stream from a java.io.InputStream

    Creates a stream from a java.io.InputStream

    Definition Classes
    ZStreamPlatformSpecificConstructors
  38. def fromInputStreamEffect[R](is: ZIO[R, IOException, InputStream], chunkSize: Int = ZStream.DefaultChunkSize): ZStream[R, IOException, Byte]

    Permalink

    Creates a stream from a java.io.InputStream.

    Creates a stream from a java.io.InputStream. Ensures that the input stream is closed after it is exhausted.

    Definition Classes
    ZStreamPlatformSpecificConstructors
  39. def fromInputStreamManaged[R](is: ZManaged[R, IOException, InputStream], chunkSize: Int = ZStream.DefaultChunkSize): ZStream[R, IOException, Byte]

    Permalink

    Creates a stream from a managed java.io.InputStream value.

    Creates a stream from a managed java.io.InputStream value.

    Definition Classes
    ZStreamPlatformSpecificConstructors
  40. def fromIterable[O](as: ⇒ Iterable[O]): ZStream[Any, Nothing, O]

    Permalink

    Creates a stream from an iterable collection of values

  41. def fromIterableM[R, E, O](iterable: ZIO[R, E, Iterable[O]]): ZStream[R, E, O]

    Permalink

    Creates a stream from an effect producing a value of type Iterable[A]

  42. def fromIterator[A](iterator: ⇒ Iterator[A]): ZStream[Any, Throwable, A]

    Permalink
  43. def fromIteratorEffect[R, A](iterator: ZIO[R, Throwable, Iterator[A]]): ZStream[R, Throwable, A]

    Permalink

    Creates a stream from an iterator that may potentially throw exceptions

  44. def fromIteratorManaged[R, A](iterator: ZManaged[R, Throwable, Iterator[A]]): ZStream[R, Throwable, A]

    Permalink

    Creates a stream from a managed iterator

  45. def fromIteratorTotal[A](iterator: ⇒ Iterator[A]): ZStream[Any, Nothing, A]

    Permalink

    Creates a stream from an iterator

  46. def fromJavaIterator[A](iterator: ⇒ Iterator[A]): ZStream[Any, Throwable, A]

    Permalink

    Creates a stream from a Java iterator that may throw exceptions

  47. def fromJavaIteratorEffect[R, A](iterator: ZIO[R, Throwable, Iterator[A]]): ZStream[R, Throwable, A]

    Permalink

    Creates a stream from a Java iterator that may potentially throw exceptions

  48. def fromJavaIteratorManaged[R, A](iterator: ZManaged[R, Throwable, Iterator[A]]): ZStream[R, Throwable, A]

    Permalink

    Creates a stream from a managed iterator

  49. def fromJavaIteratorTotal[A](iterator: ⇒ Iterator[A]): ZStream[Any, Nothing, A]

    Permalink

    Creates a stream from a Java iterator

  50. def fromQueue[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, O]): ZStream[R, E, O]

    Permalink

    Creates a stream from a zio.ZQueue of values

  51. def fromQueueWithShutdown[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, O]): ZStream[R, E, O]

    Permalink

    Creates a stream from a zio.ZQueue of values.

    Creates a stream from a zio.ZQueue of values. The queue will be shutdown once the stream is closed.

  52. def fromSchedule[R, A](schedule: Schedule[R, Any, A]): ZStream[R, Nothing, A]

    Permalink

    Creates a stream from a zio.Schedule that does not require any further input.

    Creates a stream from a zio.Schedule that does not require any further input. The stream will emit an element for each value output from the schedule, continuing for as long as the schedule continues.

  53. def fromTQueue[A](queue: TQueue[A]): ZStream[Any, Nothing, A]

    Permalink

    Creates a stream from a zio.stm.TQueue of values.

  54. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  55. def halt[E](cause: ⇒ Cause[E]): ZStream[Any, E, Nothing]

    Permalink

    The stream that always halts with cause.

  56. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  57. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  58. def iterate[A](a: A)(f: (A) ⇒ A): ZStream[Any, Nothing, A]

    Permalink

    The infinite stream of iterative function application: a, f(a), f(f(a)), f(f(f(a))), ...

  59. def managed[R, E, A](managed: ZManaged[R, E, A]): ZStream[R, E, A]

    Permalink

    Creates a single-valued stream from a managed resource

  60. def mergeAll[R, E, O](n: Int, outputBuffer: Int = 16)(streams: ZStream[R, E, O]*): ZStream[R, E, O]

    Permalink

    Merges a variable list of streams in a non-deterministic fashion.

    Merges a variable list of streams in a non-deterministic fashion. Up to n streams may be consumed in parallel and up to outputBuffer chunks may be buffered by this operator.

  61. def mergeAllUnbounded[R, E, O](outputBuffer: Int = 16)(streams: ZStream[R, E, O]*): ZStream[R, E, O]

    Permalink

    Like mergeAll, but runs all streams concurrently.

  62. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  63. val never: ZStream[Any, Nothing, Nothing]

    Permalink

    The stream that never produces any value or fails with any error.

  64. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  65. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  66. def paginate[R, E, A, S](s: S)(f: (S) ⇒ (A, Option[S])): ZStream[Any, Nothing, A]

    Permalink

    Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state.

    Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

  67. def paginateM[R, E, A, S](s: S)(f: (S) ⇒ ZIO[R, E, (A, Option[S])]): ZStream[R, E, A]

    Permalink

    Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state.

    Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

  68. def range(min: Int, max: Int): ZStream[Any, Nothing, Int]

    Permalink

    Constructs a stream from a range of integers (lower bound included, upper bound not included)

  69. def repeatEffect[R, E, A](fa: ZIO[R, E, A]): ZStream[R, E, A]

    Permalink

    Creates a stream from an effect producing a value of type A which repeats forever.

  70. def repeatEffectChunk[R, E, A](fa: ZIO[R, E, Chunk[A]]): ZStream[R, E, A]

    Permalink

    Creates a stream from an effect producing chunks of A values which repeats forever.

  71. def repeatEffectChunkOption[R, E, A](fa: ZIO[R, Option[E], Chunk[A]]): ZStream[R, E, A]

    Permalink

    Creates a stream from an effect producing chunks of A values until it fails with None.

  72. def repeatEffectOption[R, E, A](fa: ZIO[R, Option[E], A]): ZStream[R, E, A]

    Permalink

    Creates a stream from an effect producing values of type A until it fails with None.

  73. def repeatEffectWith[R, E, A](fa: ZIO[R, E, A], schedule: Schedule[R, Any, _]): ZStream[R, E, A]

    Permalink

    Creates a stream from an effect producing a value of type A which repeats using the specified schedule

  74. def service[A](implicit arg0: zio.Tag[A]): ZStream[Has[A], Nothing, A]

    Permalink

    Accesses the specified service in the environment of the effect.

  75. def services[A, B, C, D](implicit arg0: zio.Tag[A], arg1: zio.Tag[B], arg2: zio.Tag[C], arg3: zio.Tag[D]): ZStream[Has[A] with Has[B] with Has[C] with Has[D], Nothing, (A, B, C, D)]

    Permalink

    Accesses the specified services in the environment of the effect.

  76. def services[A, B, C](implicit arg0: zio.Tag[A], arg1: zio.Tag[B], arg2: zio.Tag[C]): ZStream[Has[A] with Has[B] with Has[C], Nothing, (A, B, C)]

    Permalink

    Accesses the specified services in the environment of the effect.

  77. def services[A, B](implicit arg0: zio.Tag[A], arg1: zio.Tag[B]): ZStream[Has[A] with Has[B], Nothing, (A, B)]

    Permalink

    Accesses the specified services in the environment of the effect.

  78. def succeed[A](a: ⇒ A): ZStream[Any, Nothing, A]

    Permalink

    Creates a single-valued pure stream

  79. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  80. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  81. def unfold[S, A](s: S)(f0: (S) ⇒ Option[(A, S)]): ZStream[Any, Nothing, A]

    Permalink

    Creates a stream by peeling off the "layers" of a value of type S

  82. def unfoldChunkM[R, E, A, S](s: S)(f0: (S) ⇒ ZIO[R, E, Option[(Chunk[A], S)]]): ZStream[R, E, A]

    Permalink

    Creates a stream by effectfully peeling off the "layers" of a value of type S

  83. def unfoldM[R, E, A, S](s: S)(f0: (S) ⇒ ZIO[R, E, Option[(A, S)]]): ZStream[R, E, A]

    Permalink

    Creates a stream by effectfully peeling off the "layers" of a value of type S

  84. val unit: ZStream[Any, Nothing, Unit]

    Permalink

    A stream that contains a single Unit value.

  85. def unwrap[R, E, A](fa: ZIO[R, E, ZStream[R, E, A]]): ZStream[R, E, A]

    Permalink

    Creates a stream produced from an effect

  86. def unwrapManaged[R, E, A](fa: ZManaged[R, E, ZStream[R, E, A]]): ZStream[R, E, A]

    Permalink

    Creates a stream produced from a ZManaged

  87. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  88. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  89. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  90. def zipN[R, E, A, B, C, D, F](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C], zStream4: ZStream[R, E, D])(f: (A, B, C, D) ⇒ F): ZStream[R, E, F]

    Permalink

    Returns an effect that executes the specified effects in parallel, combining their results with the specified f function.

    Returns an effect that executes the specified effects in parallel, combining their results with the specified f function. If any effect fails, then the other effects will be interrupted.

  91. def zipN[R, E, A, B, C, D](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C])(f: (A, B, C) ⇒ D): ZStream[R, E, D]

    Permalink

    Zips with specified streams together with the specified function.

  92. def zipN[R, E, A, B, C](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B])(f: (A, B) ⇒ C): ZStream[R, E, C]

    Permalink

    Zips the specified streams together with the specified function.

Inherited from AnyRef

Inherited from Any

Ungrouped