trait Schedule[-Env, -In, +Out] extends Serializable

Self Type
Schedule[Env, In, Out]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Schedule
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type State

Abstract Value Members

  1. abstract def initial: State
  2. abstract def step(now: OffsetDateTime, in: In, state: State): ZIO[Env, Nothing, (State, Out, Decision)]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def &&[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2])(implicit zippable: Zippable[Out, Out2]): WithState[(State, State), Env1, In1, Out]

    Returns a new schedule that performs a geometric intersection on the intervals defined by both schedules.

  4. def ***[Env1 <: Env, In2, Out2](that: Schedule[Env1, In2, Out2]): WithState[(State, State), Env1, (In, In2), (Out, Out2)]

    Returns a new schedule that has both the inputs and outputs of this and the specified schedule.

  5. def *>[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2]): WithState[(State, State), Env1, In1, Out2]

    The same as &&, but ignores the left output.

  6. def ++[Env1 <: Env, In1 <: In, Out2 >: Out](that: Schedule[Env1, In1, Out2]): WithState[(State, State, Boolean), Env1, In1, Out2]

    A symbolic alias for andThen.

  7. def +++[Env1 <: Env, In2, Out2](that: Schedule[Env1, In2, Out2]): WithState[(State, State), Env1, Either[In, In2], Either[Out, Out2]]

    Returns a new schedule that allows choosing between feeding inputs to this schedule, or feeding inputs to the specified schedule.

  8. def <*[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2]): WithState[(State, State), Env1, In1, Out]

    The same as &&, but ignores the right output.

  9. def <*>[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2])(implicit zippable: Zippable[Out, Out2]): WithState[(State, State), Env1, In1, Out]

    An operator alias for zip.

  10. def <<<[Env1 <: Env, In2](that: Schedule[Env1, In2, In]): WithState[(State, State), Env1, In2, Out]

    A backwards version of >>>.

  11. def <||>[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2]): WithState[(State, State, Boolean), Env1, In1, Either[Out, Out2]]

    Operator alias for andThenEither.

  12. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def >>>[Env1 <: Env, Out2](that: Schedule[Env1, Out, Out2]): WithState[(State, State), Env1, In, Out2]

    Returns the composition of this schedule and the specified schedule, by piping the output of this one into the input of the other.

    Returns the composition of this schedule and the specified schedule, by piping the output of this one into the input of the other. Effects described by this schedule will always be executed before the effects described by the second schedule.

  14. def addDelay(f: (Out) => zio.Duration): WithState[State, Env, In, Out]

    Returns a new schedule with the given delay added to every interval defined by this schedule.

  15. def addDelayZIO[Env1 <: Env](f: (Out) => URIO[Env1, zio.Duration]): WithState[State, Env1, In, Out]

    Returns a new schedule with the given effectfully computed delay added to every interval defined by this schedule.

  16. def andThen[Env1 <: Env, In1 <: In, Out2 >: Out](that: Schedule[Env1, In1, Out2]): WithState[(State, State, Boolean), Env1, In1, Out2]

    The same as andThenEither, but merges the output.

  17. def andThenEither[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2]): WithState[(State, State, Boolean), Env1, In1, Either[Out, Out2]]

    Returns a new schedule that first executes this schedule to completion, and then executes the specified schedule to completion.

  18. def as[Out2](out2: => Out2): WithState[State, Env, In, Out2]

    Returns a new schedule that maps this schedule to a constant output.

  19. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  20. def check[In1 <: In](test: (In1, Out) => Boolean): WithState[State, Env, In1, Out]

    Returns a new schedule that passes each input and output of this schedule to the spefcified function, and then determines whether or not to continue based on the return value of the function.

  21. def checkZIO[Env1 <: Env, In1 <: In](test: (In1, Out) => URIO[Env1, Boolean]): WithState[State, Env1, In1, Out]

    Returns a new schedule that passes each input and output of this schedule to the specified function, and then determines whether or not to continue based on the return value of the function.

  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  23. def collectAll[Out1 >: Out]: WithState[(State, Chunk[Out1]), Env, In, Chunk[Out1]]

    Returns a new schedule that collects the outputs of this one into a chunk.

  24. def compose[Env1 <: Env, In2](that: Schedule[Env1, In2, In]): WithState[(State, State), Env1, In2, Out]

    A named alias for <<<.

  25. def contramap[Env1 <: Env, In2](f: (In2) => In): WithState[State, Env, In2, Out]

    Returns a new schedule that deals with a narrower class of inputs than this schedule.

  26. def contramapZIO[Env1 <: Env, In2](f: (In2) => URIO[Env1, In]): WithState[State, Env1, In2, Out]

    Returns a new schedule that deals with a narrower class of inputs than this schedule.

  27. def delayed(f: (zio.Duration) => zio.Duration): WithState[State, Env, In, Out]

    Returns a new schedule with the specified effectfully computed delay added before the start of each interval produced by this schedule.

  28. def delayedZIO[Env1 <: Env](f: (zio.Duration) => URIO[Env1, zio.Duration]): WithState[State, Env1, In, Out]

    Returns a new schedule with the specified effectfully computed delay added before the start of each interval produced by this schedule.

  29. def dimap[In2, Out2](f: (In2) => In, g: (Out) => Out2): WithState[State, Env, In2, Out2]

    Returns a new schedule that contramaps the input and maps the output.

  30. def dimapZIO[Env1 <: Env, In2, Out2](f: (In2) => URIO[Env1, In], g: (Out) => URIO[Env1, Out2]): WithState[State, Env1, In2, Out2]

    Returns a new schedule that contramaps the input and maps the output.

  31. def driver: URIO[Has[Clock], Driver[State, Env, In, Out]]

    Returns a driver that can be used to step the schedule, appropriately handling sleeping.

  32. def either[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2]): WithState[(State, State), Env1, In1, (Out, Out2)]

    A named alias for ||.

  33. def eitherWith[Env1 <: Env, In1 <: In, Out2, Out3](that: Schedule[Env1, In1, Out2])(f: (Out, Out2) => Out3): WithState[(State, State), Env1, In1, Out3]

    The same as either followed by map.

  34. def ensuring(finalizer: UIO[Any]): WithState[State, Env, In, Out]

    Returns a new schedule that will run the specified finalizer as soon as the schedule is complete.

    Returns a new schedule that will run the specified finalizer as soon as the schedule is complete. Note that unlike ZIO#ensuring, this method does not guarantee the finalizer will be run. The Schedule may not initialize or the driver of the schedule may not run to completion. However, if the Schedule ever decides not to continue, then the finalizer will be run.

  35. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  37. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  38. def first[X]: WithState[(State, Unit), Env, (In, X), (Out, X)]

    Returns a new schedule that packs the input and output of this schedule into the first element of a tuple.

    Returns a new schedule that packs the input and output of this schedule into the first element of a tuple. This allows carrying information through this schedule.

  39. def fold[Z](z: Z)(f: (Z, Out) => Z): WithState[(State, Z), Env, In, Z]

    Returns a new schedule that folds over the outputs of this one.

  40. def foldZIO[Env1 <: Env, Z](z: Z)(f: (Z, Out) => URIO[Env1, Z]): WithState[(State, Z), Env1, In, Z]

    Returns a new schedule that effectfully folds over the outputs of this one.

  41. def forever: WithState[State, Env, In, Out]

    Returns a new schedule that loops this one continuously, resetting the state when this schedule is done.

  42. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  43. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  44. def intersectWith[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2])(f: (Interval, Interval) => Interval)(implicit zippable: Zippable[Out, Out2]): WithState[(State, State), Env1, In1, Out]

    Returns a new schedule that combines this schedule with the specified schedule, continuing as long as both schedules want to continue and merging the next intervals according to the specified merge function.

  45. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  46. def jittered(min: Double, max: Double): WithState[State, Env with Has[Random], In, Out]

    Returns a new schedule that randomly modifies the size of the intervals of this schedule.

  47. def jittered: WithState[State, Env with Has[Random], In, Out]

    Returns a new schedule that randomly modifies the size of the intervals of this schedule.

  48. def left[X]: WithState[(State, Unit), Env, Either[In, X], Either[Out, X]]

    Returns a new schedule that makes this schedule available on the Left side of an Either input, allowing propagating some type X through this channel on demand.

  49. def map[Out2](f: (Out) => Out2): WithState[State, Env, In, Out2]

    Returns a new schedule that maps the output of this schedule through the specified function.

  50. def mapZIO[Env1 <: Env, Out2](f: (Out) => URIO[Env1, Out2]): WithState[State, Env1, In, Out2]

    Returns a new schedule that maps the output of this schedule through the specified effectful function.

  51. def modifyDelay(f: (Out, zio.Duration) => zio.Duration): WithState[State, Env, In, Out]

    Returns a new schedule that modifies the delay using the specified function.

  52. def modifyDelayZIO[Env1 <: Env](f: (Out, zio.Duration) => URIO[Env1, zio.Duration]): WithState[State, Env1, In, Out]

    Returns a new schedule that modifies the delay using the specified effectual function.

  53. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  54. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  55. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  56. def onDecision[Env1 <: Env](f: (State, Out, Decision) => URIO[Env1, Any]): WithState[State, Env1, In, Out]

    Returns a new schedule that applies the current one but runs the specified effect for every decision of this schedule.

    Returns a new schedule that applies the current one but runs the specified effect for every decision of this schedule. This can be used to create schedules that log failures, decisions, or computed values.

  57. def provide(env: Env): WithState[State, Any, In, Out]

    Returns a new schedule with its environment provided to it, so the resulting schedule does not require any environment.

  58. def provideSome[Env2](f: (Env2) => Env): WithState[State, Env2, In, Out]

    Returns a new schedule with part of its environment provided to it, so the resulting schedule does not require any environment.

  59. def reconsider[Out2](f: (State, Out, Decision) => Either[Out2, (Out2, Interval)]): WithState[State, Env, In, Out2]

    Returns a new schedule that reconsiders every decision made by this schedule, possibly modifying the next interval and the output type in the process.

  60. def reconsiderZIO[Env1 <: Env, In1 <: In, Out2](f: (State, Out, Decision) => URIO[Env1, Either[Out2, (Out2, Interval)]]): WithState[State, Env1, In1, Out2]

    Returns a new schedule that effectfully reconsiders every decision made by this schedule, possibly modifying the next interval and the output type in the process.

  61. def repetitions: WithState[(State, Int), Env, In, Int]

    Returns a new schedule that outputs the number of repetitions of this one.

  62. final def resetAfter(duration: zio.Duration): WithState[(State, Option[OffsetDateTime]), Env, In, Out]

    Return a new schedule that automatically resets the schedule to its initial state after some time of inactivity defined by duration.

  63. final def resetWhen(f: (Out) => Boolean): WithState[State, Env, In, Out]

    Resets the schedule when the specified predicate on the schedule output evaluates to true.

  64. def right[X]: WithState[(Unit, State), Env, Either[X, In], Either[X, Out]]

    Returns a new schedule that makes this schedule available on the Right side of an Either input, allowing propagating some type X through this channel on demand.

  65. def run(now: OffsetDateTime, input: Iterable[In]): URIO[Env, Chunk[Out]]

    Runs a schedule using the provided inputs, and collects all outputs.

  66. def second[X]: WithState[(Unit, State), Env, (X, In), (X, Out)]

    Returns a new schedule that packs the input and output of this schedule into the second element of a tuple.

    Returns a new schedule that packs the input and output of this schedule into the second element of a tuple. This allows carrying information through this schedule.

  67. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  68. def tapInput[Env1 <: Env, In1 <: In](f: (In1) => URIO[Env1, Any]): WithState[State, Env1, In1, Out]

    Returns a new schedule that effectfully processes every input to this schedule.

  69. def tapOutput[Env1 <: Env](f: (Out) => URIO[Env1, Any]): WithState[State, Env1, In, Out]

    Returns a new schedule that effectfully processes every output from this schedule.

  70. def toString(): String
    Definition Classes
    AnyRef → Any
  71. def unionWith[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2])(f: (Interval, Interval) => Interval)(implicit zippable: Zippable[Out, Out2]): WithState[(State, State), Env1, In1, Out]

    Returns a new schedule that combines this schedule with the specified schedule, continuing as long as either schedule wants to continue and merging the next intervals according to the specified merge function.

  72. def unit: WithState[State, Env, In, Unit]

    Returns a new schedule that maps the output of this schedule to unit.

  73. def untilInput[In1 <: In](f: (In1) => Boolean): WithState[State, Env, In1, Out]

    Returns a new schedule that continues until the specified predicate on the input evaluates to true.

  74. def untilInputZIO[Env1 <: Env, In1 <: In](f: (In1) => URIO[Env1, Boolean]): WithState[State, Env1, In1, Out]

    Returns a new schedule that continues until the specified effectful predicate on the input evaluates to true.

  75. def untilOutput(f: (Out) => Boolean): WithState[State, Env, In, Out]

    Returns a new schedule that continues until the specified predicate on the output evaluates to true.

  76. def untilOutputZIO[Env1 <: Env](f: (Out) => URIO[Env1, Boolean]): WithState[State, Env1, In, Out]

    Returns a new schedule that continues until the specified effectful predicate on the output evaluates to true.

  77. def upTo(duration: zio.Duration): WithState[(State, Option[OffsetDateTime]), Env, In, Out]

    A schedule that recurs during the given duration

  78. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  79. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  80. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  81. def whileInput[In1 <: In](f: (In1) => Boolean): WithState[State, Env, In1, Out]

    Returns a new schedule that continues for as long the specified predicate on the input evaluates to true.

  82. def whileInputZIO[Env1 <: Env, In1 <: In](f: (In1) => URIO[Env1, Boolean]): WithState[State, Env1, In1, Out]

    Returns a new schedule that continues for as long the specified effectful predicate on the input evaluates to true.

  83. def whileOutput(f: (Out) => Boolean): WithState[State, Env, In, Out]

    Returns a new schedule that continues for as long the specified predicate on the output evaluates to true.

  84. def whileOutputZIO[Env1 <: Env](f: (Out) => URIO[Env1, Boolean]): WithState[State, Env1, In, Out]

    Returns a new schedule that continues for as long the specified effectful predicate on the output evaluates to true.

  85. def zip[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2])(implicit zippable: Zippable[Out, Out2]): WithState[(State, State), Env1, In1, Out]

    A named method for &&.

  86. def zipLeft[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2]): WithState[(State, State), Env1, In1, Out]

    The same as &&, but ignores the right output.

  87. def zipRight[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2]): WithState[(State, State), Env1, In1, Out2]

    The same as &&, but ignores the left output.

  88. def zipWith[Env1 <: Env, In1 <: In, Out2, Out3](that: Schedule[Env1, In1, Out2])(f: (Out, Out2) => Out3): WithState[(State, State), Env1, In1, Out3]

    Equivalent to zip followed by map.

  89. def ||[Env1 <: Env, In1 <: In, Out2](that: Schedule[Env1, In1, Out2])(implicit zippable: Zippable[Out, Out2]): WithState[(State, State), Env1, In1, Out]

    Returns a new schedule that performs a geometric union on the intervals defined by both schedules.

  90. def |||[Env1 <: Env, Out1 >: Out, In2](that: Schedule[Env1, In2, Out1]): Schedule[Env1, Either[In, In2], Out1]

    Returns a new schedule that chooses between two schedules with a common output.

Deprecated Value Members

  1. def addDelayM[Env1 <: Env](f: (Out) => URIO[Env1, zio.Duration]): WithState[State, Env1, In, Out]

    Returns a new schedule with the given effectfully computed delay added to every interval defined by this schedule.

    Returns a new schedule with the given effectfully computed delay added to every interval defined by this schedule.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use addDelayZIO

  2. def checkM[Env1 <: Env, In1 <: In](test: (In1, Out) => URIO[Env1, Boolean]): WithState[State, Env1, In1, Out]

    Returns a new schedule that passes each input and output of this schedule to the specified function, and then determines whether or not to continue based on the return value of the function.

    Returns a new schedule that passes each input and output of this schedule to the specified function, and then determines whether or not to continue based on the return value of the function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkZIO

  3. def contramapM[Env1 <: Env, In2](f: (In2) => URIO[Env1, In]): WithState[State, Env1, In2, Out]

    Returns a new schedule that deals with a narrower class of inputs than this schedule.

    Returns a new schedule that deals with a narrower class of inputs than this schedule.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use contramapZIO

  4. def delayedM[Env1 <: Env](f: (zio.Duration) => URIO[Env1, zio.Duration]): WithState[State, Env1, In, Out]

    Returns a new schedule with the specified effectfully computed delay added before the start of each interval produced by this schedule.

    Returns a new schedule with the specified effectfully computed delay added before the start of each interval produced by this schedule.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use delayedZIO

  5. def dimapM[Env1 <: Env, In2, Out2](f: (In2) => URIO[Env1, In], g: (Out) => URIO[Env1, Out2]): WithState[State, Env1, In2, Out2]

    Returns a new schedule that contramaps the input and maps the output.

    Returns a new schedule that contramaps the input and maps the output.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use dimapZIO

  6. def foldM[Env1 <: Env, Z](z: Z)(f: (Z, Out) => URIO[Env1, Z]): WithState[(State, Z), Env1, In, Z]

    Returns a new schedule that effectfully folds over the outputs of this one.

    Returns a new schedule that effectfully folds over the outputs of this one.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use foldZIO

  7. def mapM[Env1 <: Env, Out2](f: (Out) => URIO[Env1, Out2]): WithState[State, Env1, In, Out2]

    Returns a new schedule that maps the output of this schedule through the specified effectful function.

    Returns a new schedule that maps the output of this schedule through the specified effectful function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use mapZIO

  8. def modifyDelayM[Env1 <: Env](f: (Out, zio.Duration) => URIO[Env1, zio.Duration]): WithState[State, Env1, In, Out]

    Returns a new schedule that modifies the delay using the specified effectual function.

    Returns a new schedule that modifies the delay using the specified effectual function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use modifyDelayZIO

  9. def reconsiderM[Env1 <: Env, In1 <: In, Out2](f: (State, Out, Decision) => URIO[Env1, Either[Out2, (Out2, Interval)]]): WithState[State, Env1, In1, Out2]

    Returns a new schedule that effectfully reconsiders every decision made by this schedule, possibly modifying the next interval and the output type in the process.

    Returns a new schedule that effectfully reconsiders every decision made by this schedule, possibly modifying the next interval and the output type in the process.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use reconsiderZIO

  10. def untilInputM[Env1 <: Env, In1 <: In](f: (In1) => URIO[Env1, Boolean]): WithState[State, Env1, In1, Out]

    Returns a new schedule that continues until the specified effectful predicate on the input evaluates to true.

    Returns a new schedule that continues until the specified effectful predicate on the input evaluates to true.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use untilInputZIO

  11. def untilOutputM[Env1 <: Env](f: (Out) => URIO[Env1, Boolean]): WithState[State, Env1, In, Out]

    Returns a new schedule that continues until the specified effectful predicate on the output evaluates to true.

    Returns a new schedule that continues until the specified effectful predicate on the output evaluates to true.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use untilOutputZIO

  12. def whileInputM[Env1 <: Env, In1 <: In](f: (In1) => URIO[Env1, Boolean]): WithState[State, Env1, In1, Out]

    Returns a new schedule that continues for as long the specified effectful predicate on the input evaluates to true.

    Returns a new schedule that continues for as long the specified effectful predicate on the input evaluates to true.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use whileInputZIO

  13. def whileOutputM[Env1 <: Env](f: (Out) => URIO[Env1, Boolean]): WithState[State, Env1, In, Out]

    Returns a new schedule that continues for as long the specified effectful predicate on the output evaluates to true.

    Returns a new schedule that continues for as long the specified effectful predicate on the output evaluates to true.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use whileOutputZIO

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped