scalaz.stream

Process

object Process

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Process
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Await[F[_], A, +O] extends Process[F, O] with Product with Serializable

    The Await constructor instructs the driver to evaluate req.

  2. class CausedBy extends Exception

  3. type Channel[+F[_], -I, O] = Process[F, (I) ⇒ F[O]]

    An effectful channel, to which we can send values and get back responses.

    An effectful channel, to which we can send values and get back responses. Modeled as a source of effectful functions.

  4. implicit class ChannelSyntax[F[_], I, O] extends AnyRef

  5. implicit class ChanneledProcess[F[_], O, O2] extends AnyRef

  6. case class Emit[F[_], O](head: Seq[O], tail: Process[F, O]) extends Process[F, O] with Product with Serializable

    The Emit constructor instructs the driver to emit the given sequence of values to the output.

  7. case class Env[-I, -I2]() extends Product with Serializable

  8. implicit class EvalProcess[F[_], O] extends AnyRef

    Provides infix syntax for eval: Process[F,F[O]] => Process[F,O]

  9. case class Halt(cause: Throwable) extends Process[Nothing, Nothing] with Product with Serializable

    The Halt constructor instructs the driver to stop due to the given Throwable.

  10. type Process0[+O] = Process[Is, O]

  11. implicit class Process0Syntax[O] extends AnyRef

    This class provides infix syntax specific to Process0.

  12. type Process1[-I, +O] = Process[Is, O]

    A single input stream transducer.

    A single input stream transducer. Accepts input of type I, and emits values of type O.

  13. implicit class Process1Syntax[I, O] extends AnyRef

    This class provides infix syntax specific to Process1.

  14. type Process1W[+W, -I, +O] = Process[Is, \/[W, O]]

    A Process1 that writes values of type W.

  15. implicit class ProcessSyntax[F[_], O] extends AnyRef

    Various Process functions that aren't worth putting on Process due to variance issues.

  16. trait ProcessTC[F[_]] extends AnyRef

  17. type Sink[+F[_], -O] = Process[F, (O) ⇒ F[Unit]]

    An effectful sink, to which we can send values.

    An effectful sink, to which we can send values. Modeled as a source of effectful functions.

  18. implicit class SourceSyntax[O] extends AnyRef

    This class provides infix syntax specific to Process[Task, _].

  19. trait Subprotocol[F[_], G[_]] extends AnyRef

    Evidence that F[x] <: G[x] for all x.

  20. type Tee[-I, -I2, +O] = Process[T, O]

    A stream transducer that can read from one of two inputs, the 'left' (of type I) or the 'right' (of type I2).

    A stream transducer that can read from one of two inputs, the 'left' (of type I) or the 'right' (of type I2). Process1[I,O] <: Tee[I,I2,O].

  21. implicit class TeeSyntax[I, I2, O] extends AnyRef

    This class provides infix syntax specific to Tee.

  22. type TeeW[+W, -I, -I2, +O] = Process[T, \/[W, O]]

    A Tee that writes values of type W.

  23. type Writer[+F[_], +W, +O] = Process[F, \/[W, O]]

    A Writer[F,W,O] is a Process[F, W \/ O].

    A Writer[F,W,O] is a Process[F, W \/ O]. See Process.WriterSyntax for convenience functions for working with either the written values (the W) or the output values (the O).

    This is useful for logging or other situations where we want to emit some values 'on the side' while doing something else with the main output of a Process.

  24. implicit class WriterSyntax[F[_], W, O] extends AnyRef

    Infix syntax for working with Writer[F,W,O].

  25. type Wye[-I, -I2, +O] = Process[Y, O]

    A stream transducer that can read from one of two inputs, nondeterministically.

    A stream transducer that can read from one of two inputs, nondeterministically. This

  26. implicit class WyeSyntax[I, I2, O] extends AnyRef

    This class provides infix syntax specific to Wye.

  27. type WyeW[+W, -I, -I2, +O] = Process[Y, \/[W, O]]

    A Tee that writes values of type W.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Await1

  7. object AwaitBoth

  8. object AwaitF

  9. object AwaitL

  10. object AwaitR

  11. def Both[I, I2]: Y[These[I, I2]]

  12. object CausedBy extends Serializable

  13. object End extends Exception with Product with Serializable

    Special exception indicating normal termination.

  14. def Get[I]: Is[I]

  15. def L[I]: Is[I]

  16. def R[I2]: T[I2]

  17. def apply[O](o: O*): Process[Nothing, O]

  18. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  19. def await[F[_], A, O](req: F[A])(recv: (A) ⇒ Process[F, O] = (a: A) => halt, fallback: Process[F, O] = halt, cleanup: Process[F, O] = halt): Process[F, O]

  20. def await1[I]: Process1[I, I]

  21. def await1W[A]: Process1W[Nothing, A, A]

    Writer based version of await1.

  22. def awaitBoth[I, I2]: Wye[I, I2, These[I, I2]]

  23. def awaitBothW[I, I2]: WyeW[Nothing, I, I2, These[I, I2]]

    Writer based version of awaitBoth.

  24. def awaitL[I]: Tee[I, Any, I]

  25. def awaitLW[I]: TeeW[Nothing, I, Any, I]

    Writer based version of awaitL.

  26. def awaitR[I2]: Tee[Any, I2, I2]

  27. def awaitRW[I2]: TeeW[Nothing, Any, I2, I2]

    Writer based version of awaitR.

  28. def awakeEvery(d: Duration)(implicit pool: ExecutorService = Strategy.DefaultExecutorService, schedulerPool: ScheduledExecutorService = _scheduler): Process[Task, Duration]

    A discrete tasks which emits elapsed durations at the given regular duration.

    A discrete tasks which emits elapsed durations at the given regular duration. For example: awakeEvery(5 seconds) will return (approximately) 5s, 10s, 20s, and will lie dormant between emitted values. By default, this uses a shared ScheduledExecutorService for the timed events, and runs the actual callbacks on pool, which avoids blocking a useful thread simply to interpret the delays between events.

  29. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def constant[A](a: A, chunkSize: Int = 1): Process[Task, A]

    The infinite Process, always emits a.

  31. def duration: Process[Task, Duration]

    A continuous stream of the elapsed time, computed using System.nanoTime.

    A continuous stream of the elapsed time, computed using System.nanoTime. Note that the actual granularity of these elapsed times depends on the OS, for instance the OS may only update the current time every ten milliseconds or so.

  32. def emit[O](head: O): Process[Nothing, O]

    Emit a single value, then Halt.

  33. def emitAll[O](seq: Seq[O]): Process[Nothing, O]

    Emit a sequence of values, then Halt.

  34. def emitLazy[O](head: ⇒ O): Process[Nothing, O]

  35. def emitO[O](o: O): Process[Nothing, \/[Nothing, O]]

    A Writer which emits one value to the output.

  36. def emitRange(start: Int, stopExclusive: Int): Process[Nothing, Int]

    Process.emitRange(0,5) == Process(0,1,2,3,4).

  37. def emitSeq[F[_], O](head: Seq[O], tail: Process[F, O] = halt): Process[F, O]

  38. def emitView[O](head: O): Process[Nothing, O]

  39. def emitW[W](s: W): Process[Nothing, \/[W, Nothing]]

    A Writer which writes the given value.

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

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

    Definition Classes
    AnyRef → Any
  42. def eval[F[_], O](t: F[O]): Process[F, O]

    Evaluate an arbitrary effect in a Process.

    Evaluate an arbitrary effect in a Process. The resulting Process emits a single value. To evaluate repeatedly, use repeateEval(t) or equivalently eval(t).repeat.

  43. def eval_[F[_], O](t: F[O]): Process[F, Nothing]

    Evaluate an arbitrary effect once, purely for its effects, ignoring its return value.

    Evaluate an arbitrary effect once, purely for its effects, ignoring its return value. This Process emits no values.

  44. def every(d: Duration): Process[Task, Boolean]

    A continuous stream which is true after d, 2d, 3d... elapsed duration.

    A continuous stream which is true after d, 2d, 3d... elapsed duration. If you'd like a discrete stream that will actually block until d has elapsed, use awakeEvery instead.

  45. def fail(e: Throwable): Process[Nothing, Nothing]

    A Process that halts due to the given exception.

  46. def fill[A](n: Int)(a: A, chunkSize: Int = 1): Process[Task, A]

    A Process which emits n repetitions of a.

  47. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  48. def fix[A](f: (Process[Task, A]) ⇒ Process[Task, A]): Process[Task, A]

    Feed the output of f back in as its input.

    Feed the output of f back in as its input. Note that deadlock can occur if f tries to read from the looped back input before any output has been produced.

  49. def forwardFill[A](p: Process[Task, A])(implicit S: Strategy = Strategy.DefaultStrategy): Process[Task, A]

    Produce a continuous stream from a discrete stream by using the most recent value.

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

    Definition Classes
    AnyRef → Any
  51. val halt: Process[Nothing, Nothing]

    A Process that halts due to normal termination.

  52. def hashCode(): Int

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

    Definition Classes
    Any
  54. def liftW[F[_], A](p: Process[F, A]): Writer[F, Nothing, A]

    Promote a Process to a Writer that writes nothing.

  55. def logged[F[_], A](p: Process[F, A]): Writer[F, A, A]

    Promote a Process to a Writer that writes and outputs all values of p.

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

    Definition Classes
    AnyRef
  57. final def notify(): Unit

    Definition Classes
    AnyRef
  58. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  59. implicit def processInstance[F[_]]: MonadPlus[[x]Process[F, x]]

  60. def range(start: Int, stopExclusive: Int, by: Int = 1): Process[Task, Int]

    Lazily produce the range [start, stopExclusive).

  61. def ranges(start: Int, stopExclusive: Int, size: Int): Process[Task, (Int, Int)]

    Lazily produce a sequence of nonoverlapping ranges, where each range contains size integers, assuming the upper bound is exclusive.

    Lazily produce a sequence of nonoverlapping ranges, where each range contains size integers, assuming the upper bound is exclusive. Example: ranges(0, 1000, 10) results in the pairs (0, 10), (10, 20), (20, 30) ... (990, 1000)

    Note: The last emitted range may be truncated at stopExclusive. For instance, ranges(0,5,4) results in (0,4), (4,5).

  62. def receive1[I, O](recv: (I) ⇒ Process1[I, O], fallback: Process1[I, O] = halt): Process1[I, O]

  63. def receiveBoth[I, I2, O](recv: (These[I, I2]) ⇒ Wye[I, I2, O], fallback: Wye[I, I2, O] = halt, cleanup: Wye[I, I2, O] = halt): Wye[I, I2, O]

  64. def receiveL[I, I2, O](recv: (I) ⇒ Tee[I, I2, O], fallback: Tee[I, I2, O] = halt, cleanup: Tee[I, I2, O] = halt): Tee[I, I2, O]

  65. def receiveLOr[I, I2, O](fallback: Tee[I, I2, O])(recvL: (I) ⇒ Tee[I, I2, O]): Tee[I, I2, O]

  66. def receiveR[I, I2, O](recv: (I2) ⇒ Tee[I, I2, O], fallback: Tee[I, I2, O] = halt, cleanup: Tee[I, I2, O] = halt): Tee[I, I2, O]

  67. def receiveROr[I, I2, O](fallback: Tee[I, I2, O])(recvR: (I2) ⇒ Tee[I, I2, O]): Tee[I, I2, O]

  68. def repeat[F[_], O](p: Process[F, O]): Process[F, O]

    Prefix syntax for p.repeat.

  69. def repeatEval[F[_], O](t: F[O]): Process[F, O]

    eval an arbitrary effect in a Process.

    eval an arbitrary effect in a Process. The resulting Process will emit values until evaluation of t signals termination with End or an error occurs.

  70. def sleep(p: Duration)(implicit pool: ExecutorService = Strategy.DefaultExecutorService, schedulerPool: ScheduledExecutorService = _scheduler): Process[Task, Nothing]

    A single-element Process that waits for the given number of milliseconds before emitting its value.

    A single-element Process that waits for the given number of milliseconds before emitting its value. This uses a shared ScheduledThreadPoolExecutor rather than calling Thread.sleep on the main Process.

  71. def sleepUntil[F[_], A](awaken: Process[F, Boolean])(p: Process[F, A]): Process[F, A]

    Delay running p until awaken becomes true for the first time.

    Delay running p until awaken becomes true for the first time. The awaken process may be discrete.

  72. def state[S](s0: S): Process[Task, (S, (S) ⇒ Task[Unit])]

    Produce a stream encapsulating some state, S.

    Produce a stream encapsulating some state, S. At each step, produces the current state, and an effectful function to set the state that will be produced next step.

  73. def supply(initial: Long): Process[Task, Long]

    A supply of Long values, starting with initial.

    A supply of Long values, starting with initial. Each read is guaranteed to retun a value which is unique across all threads reading from this supply.

  74. def suspend[A](p: ⇒ Process[Task, A]): Process[Task, A]

    Produce p lazily, guarded by a single Await.

    Produce p lazily, guarded by a single Await. Useful if producing the process involves allocation of some mutable resource we want to ensure is accessed in a single-threaded way.

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

    Definition Classes
    AnyRef
  76. def tell[S](s: S): Process[Nothing, \/[S, Nothing]]

    A Writer which writes the given value; alias for emitW.

  77. implicit def toApplicativeOps[F[_], A](f: Process[F, A]): ApplicativeOps[[y]Process[F, y], A]

  78. implicit def toApplyOps[F[_], A](f: Process[F, A]): ApplyOps[[y]Process[F, y], A]

  79. implicit def toFunctorOps[F[_], A](f: Process[F, A]): FunctorOps[[y]Process[F, y], A]

  80. implicit def toMonadOps[F[_], A](f: Process[F, A]): MonadOps[[y]Process[F, y], A]

  81. def toString(): String

    Definition Classes
    AnyRef → Any
  82. def toTask[A](p: Process[Task, A]): Task[A]

    Convert a Process to a Task which can be run repeatedly to generate the elements of the Process.

  83. def unfold[S, A](s0: S)(f: (S) ⇒ Option[(A, S)]): Process[Task, A]

    Produce a (potentially infinite) source from an unfold.

  84. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  87. def when[F[_], O](condition: Process[F, Boolean])(p: Process[F, O]): Process[F, O]

    When condition is true, lets through any values in this process, otherwise blocks until condition becomes true again.

    When condition is true, lets through any values in this process, otherwise blocks until condition becomes true again. While condition is true, the returned Process will listen asynchronously for the condition to become false again. There is infix syntax for this as well, p.when(condition) has the same effect.

  88. def witnessIs[I, J](req: Is[J]): ===[I, J]

    Obtain an equality witness from an Is request.

  89. def witnessT[I, I2, J](t: T[J]): \/[===[I, J], ===[I2, J]]

    Obtain an equality witness from a T request.

  90. def witnessY[I, I2, J](t: Y[J]): \/[\/[===[I, J], ===[I2, J]], ===[These[I, I2], J]]

    Obtain an equality witness from a Y request.

Inherited from AnyRef

Inherited from Any

Ungrouped