object ZSchedule extends Serializable
- Alphabetic
- By Inheritance
- ZSchedule
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- sealed case class Decision[+A, +B] extends Product with Serializable
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 apply[R, S, A, B](initial0: ZIO[R, Nothing, S], update0: (A, S) ⇒ ZIO[R, Nothing, Decision[S, B]]): ZSchedule[R, A, B]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
collectAll[A]: Schedule[A, List[A]]
A schedule that recurs forever, collecting all inputs into a list.
-
final
def
collectUntil[A](f: (A) ⇒ Boolean): Schedule[A, List[A]]
A schedule that recurs until the condition f failes, collecting all inputs into a list.
-
final
def
collectUntilM[A](f: (A) ⇒ UIO[Boolean]): Schedule[A, List[A]]
A schedule that recurs until the effectful condition f failes, collecting all inputs into a list.
-
final
def
collectWhile[A](f: (A) ⇒ Boolean): Schedule[A, List[A]]
A schedule that recurs as long as the condition f holds, collecting all inputs into a list.
-
final
def
collectWhileM[A](f: (A) ⇒ UIO[Boolean]): Schedule[A, List[A]]
A schedule that recurs as long as the effectful condition holds, collecting all inputs into a list.
-
final
val
decision: Schedule[Any, Boolean]
A schedule that will recur forever with no delay, returning the decision from the steps.
A schedule that will recur forever with no delay, returning the decision from the steps. You can chain this onto the end of schedules to find out what their decision is, e.g.
Schedule.recurs(5) >>> Schedule.decision
. -
final
val
delay: Schedule[Any, Duration]
A schedule that will recur forever with no delay, returning the duration between steps.
A schedule that will recur forever with no delay, returning the duration between steps. You can chain this onto the end of schedules to find out what their delay is, e.g.
Schedule.spaced(1.second) >>> Schedule.delay
. -
final
def
delayed[R, A](s: ZSchedule[R, A, Duration]): ZSchedule[R, A, Duration]
A new schedule derived from the specified schedule which adds the delay specified as output to the existing duration.
-
final
def
doUntil[A, B](pf: PartialFunction[A, B]): Schedule[A, Option[B]]
A schedule that recurs for until the input value becomes applicable to partial function and then map that value with given function.
-
final
def
doUntil[A](f: (A) ⇒ Boolean): Schedule[A, A]
A schedule that recurs for until the predicate evaluates to true.
-
final
def
doUntilM[A](f: (A) ⇒ UIO[Boolean]): Schedule[A, A]
A schedule that recurs for until the predicate evaluates to true.
-
final
def
doWhile[A](f: (A) ⇒ Boolean): Schedule[A, A]
A schedule that recurs for as long as the predicate evaluates to true.
-
final
def
doWhileM[A](f: (A) ⇒ UIO[Boolean]): Schedule[A, A]
A schedule that recurs for as long as the effectful predicate evaluates to true.
-
final
def
duration(duration: Duration): ZSchedule[Clock, Any, Duration]
A schedule that will recur until the specified duration elapses.
A schedule that will recur until the specified duration elapses. Returns the total elapsed time.
-
final
val
elapsed: ZSchedule[Clock, Any, Duration]
A schedule that recurs forever without delay.
A schedule that recurs forever without delay. Returns the elapsed time since the schedule began.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
exponential(base: Duration, factor: Double = 2.0): Schedule[Any, Duration]
A schedule that always recurs, but will wait a certain amount between repetitions, given by
base * factor.pow(n)
, wheren
is the number of repetitions so far.A schedule that always recurs, but will wait a certain amount between repetitions, given by
base * factor.pow(n)
, wheren
is the number of repetitions so far. Returns the current duration between recurrences. -
final
def
fibonacci(one: Duration): Schedule[Any, Duration]
A schedule that always recurs, increasing delays by summing the preceding two delays (similar to the fibonacci sequence).
A schedule that always recurs, increasing delays by summing the preceding two delays (similar to the fibonacci sequence). Returns the current duration between recurrences.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
fixed(interval: Duration): ZSchedule[Clock, Any, Int]
A schedule that recurs on a fixed interval.
A schedule that recurs on a fixed interval. Returns the number of repetitions of the schedule so far.
If the action run between updates takes longer than the interval, then the action will be run immediately, but re-runs will not "pile up".
|---------interval---------|---------interval---------| |action| |action|
-
final
val
forever: Schedule[Any, Int]
A schedule that recurs forever, producing a count of inputs.
A schedule that recurs forever, producing a count of inputs. Not in alphabetic order because other vals below depend on it.
-
final
def
fromFunction[A, B](f: (A) ⇒ B): Schedule[A, B]
A schedule that recurs forever, mapping input values through the specified function.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
identity[A]: Schedule[A, A]
A schedule that recurs forever, returning each input as the output.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
linear(base: Duration): Schedule[Any, Duration]
A schedule that always recurs, but will repeat on a linear time interval, given by
base * n
wheren
is the number of repetitions so far.A schedule that always recurs, but will repeat on a linear time interval, given by
base * n
wheren
is the number of repetitions so far. Returns the current duration between recurrences. -
final
def
logInput[R, A](f: (A) ⇒ ZIO[R, Nothing, Unit]): ZSchedule[R, A, A]
A schedule that recurs forever, dumping input values to the specified sink, and returning those same values unmodified.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
val
never: Schedule[Any, Nothing]
A schedule that never executes.
A schedule that never executes. Note that negating this schedule does not produce a schedule that executes.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
val
once: Schedule[Any, Unit]
A schedule that executes once.
-
final
def
recurs(n: Int): Schedule[Any, Int]
A schedule that recurs the specified number of times.
A schedule that recurs the specified number of times. Returns the number of repetitions so far.
If 0 or negative numbers are given, the operation is not done at all so that in
(op: IO[E, A]).repeat(Schedule.recurs(0))
, op is not done at all. -
final
def
spaced(interval: Duration): Schedule[Any, Int]
A schedule that waits for the specified amount of time between each input.
A schedule that waits for the specified amount of time between each input. Returns the number of inputs so far.
|action|-----interval-----|action|-----interval-----|action|
-
final
def
succeed[A](a: A): Schedule[Any, A]
A schedule that recurs forever, returning the constant for every output.
-
final
def
succeedLazy[A](a: ⇒ A): Schedule[Any, A]
A schedule that recurs forever, returning the constant for every output (by-name version).
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
unfold[A](a: ⇒ A)(f: (A) ⇒ A): Schedule[Any, A]
A schedule that always recurs without delay, and computes the output through recured application of a function to a base value.
-
final
def
unfoldM[R, A](a: ZIO[R, Nothing, A])(f: (A) ⇒ ZIO[R, Nothing, A]): ZSchedule[R, Any, A]
A schedule that always recurs without delay, and computes the output through recured application of a function to a base value.
-
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
- @native() @throws( ... )
- object Decision extends Serializable