Object/Trait

zio

Schedule

Related Docs: trait Schedule | package zio

Permalink

object Schedule extends Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Schedule
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Decision extends AnyRef

    Permalink
  2. final case class Driver[+State, -Env, -In, +Out](next: (In) ⇒ ZIO[Env, None.type, Out], last: IO[NoSuchElementException, Out], reset: UIO[Unit], state: UIO[State]) extends Product with Serializable

    Permalink
  3. sealed abstract class Interval extends AnyRef

    Permalink

    An Interval represents an interval of time.

    An Interval represents an interval of time. Intervals can encompass all time, or no time at all.

  4. type WithState[State0, -Env, -In0, +Out0] = Schedule[Env, In0, Out0] { type State = State0 }

    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. object Decision

    Permalink
  5. object Interval extends (OffsetDateTime, OffsetDateTime) ⇒ Interval

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def collectAll[A](implicit trace: ZTraceElement): WithState[(Unit, Chunk[A]), Any, A, Chunk[A]]

    Permalink

    A schedule that recurs anywhere, collecting all inputs into a list.

  9. def collectUntil[A](f: (A) ⇒ Boolean)(implicit trace: ZTraceElement): WithState[(Unit, Chunk[A]), Any, A, Chunk[A]]

    Permalink

    A schedule that recurs until the condition f fails, collecting all inputs into a list.

  10. def collectUntilZIO[Env, A](f: (A) ⇒ URIO[Env, Boolean])(implicit trace: ZTraceElement): WithState[(Unit, Chunk[A]), Env, A, Chunk[A]]

    Permalink

    A schedule that recurs until the effectful condition f fails, collecting all inputs into a list.

  11. def collectWhile[A](f: (A) ⇒ Boolean)(implicit trace: ZTraceElement): WithState[(Unit, Chunk[A]), Any, A, Chunk[A]]

    Permalink

    A schedule that recurs as long as the condition f holds, collecting all inputs into a list.

  12. def collectWhileZIO[Env, A](f: (A) ⇒ URIO[Env, Boolean])(implicit trace: ZTraceElement): WithState[(Unit, Chunk[A]), Env, A, Chunk[A]]

    Permalink

    A schedule that recurs as long as the effectful condition holds, collecting all inputs into a list.

  13. val count: WithState[Long, Any, Any, Long]

    Permalink

    A schedule that always recurs, which counts the number of recurrences.

  14. def dayOfMonth(day: Int)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    Cron-like schedule that recurs every specified day of month.

    Cron-like schedule that recurs every specified day of month. Won't recur on months containing less days than specified in day param.

    It triggers at zero hour of the day. Producing a count of repeats: 0, 1, 2.

    NOTE: day parameter is validated lazily. Must be in range 1...31.

  15. def dayOfWeek(day: Int)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    Cron-like schedule that recurs every specified day of each week.

    Cron-like schedule that recurs every specified day of each week. It triggers at zero hour of the week. Producing a count of repeats: 0, 1, 2.

    NOTE: day parameter is validated lazily. Must be in range 1 (Monday)...7 (Sunday).

  16. def delayed[Env, In](schedule: Schedule[Env, In, zio.Duration])(implicit trace: ZTraceElement): WithState[State, Env, In, zio.Duration]

    Permalink

    Takes a schedule that produces a delay, and returns a new schedule that uses this delay to further delay intervals in the resulting schedule.

  17. def duration(duration: zio.Duration): WithState[Boolean, Any, Any, zio.Duration]

    Permalink

    A schedule that can recur one time, the specified amount of time into the future.

  18. val elapsed: WithState[Option[OffsetDateTime], Any, Any, zio.Duration]

    Permalink

    A schedule that occurs everywhere, which returns the total elapsed duration since the first step.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def exponential(base: zio.Duration, factor: Double = 2.0)(implicit trace: ZTraceElement): WithState[Long, Any, Any, zio.Duration]

    Permalink

    A schedule that always recurs, but will wait a certain amount between repetitions, given by base * factor.pow(n), where n 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), where n is the number of repetitions so far. Returns the current duration between recurrences.

  22. def fibonacci(one: zio.Duration)(implicit trace: ZTraceElement): WithState[(zio.Duration, zio.Duration), Any, Any, zio.Duration]

    Permalink

    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.

  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def fixed(interval: zio.Duration): WithState[(Option[(Long, Long)], Long), Any, Any, Long]

    Permalink

    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-----|-----interval-----|
    |---------action--------||action|-----|action|-----------|
    

  25. val forever: WithState[Long, Any, Any, Long]

    Permalink

    A schedule that always recurs, producing a count of repeats: 0, 1, 2.

  26. def fromDuration(duration: zio.Duration): WithState[Boolean, Any, Any, zio.Duration]

    Permalink

    A schedule that recurs once with the specified delay.

  27. def fromDurations(duration: zio.Duration, durations: zio.Duration*): WithState[(::[zio.Duration], Boolean), Any, Any, zio.Duration]

    Permalink

    A schedule that recurs once for each of the specified durations, delaying each time for the length of the specified duration.

    A schedule that recurs once for each of the specified durations, delaying each time for the length of the specified duration. Returns the length of the current duration between recurrences.

  28. def fromFunction[A, B](f: (A) ⇒ B)(implicit trace: ZTraceElement): WithState[Unit, Any, A, B]

    Permalink

    A schedule that always recurs, mapping input values through the specified function.

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

    Permalink
    Definition Classes
    AnyRef → Any
  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  31. def hourOfDay(hour: Int)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    Cron-like schedule that recurs every specified hour of each day.

    Cron-like schedule that recurs every specified hour of each day. It triggers at zero minute of the hour. Producing a count of repeats: 0, 1, 2.

    NOTE: hour parameter is validated lazily. Must be in range 0...23.

  32. def identity[A]: WithState[Unit, Any, A, A]

    Permalink

    A schedule that always recurs, which returns inputs as outputs.

  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. def linear(base: zio.Duration)(implicit trace: ZTraceElement): WithState[Long, Any, Any, zio.Duration]

    Permalink

    A schedule that always recurs, but will repeat on a linear time interval, given by base * n where n is the number of repetitions so far.

    A schedule that always recurs, but will repeat on a linear time interval, given by base * n where n is the number of repetitions so far. Returns the current duration between recurrences.

  35. def maxOffsetDateTime(l: OffsetDateTime, r: OffsetDateTime): OffsetDateTime

    Permalink
  36. def minOffsetDateTime(l: OffsetDateTime, r: OffsetDateTime): OffsetDateTime

    Permalink
  37. def minuteOfHour(minute: Int)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    Cron-like schedule that recurs every specified minute of each hour.

    Cron-like schedule that recurs every specified minute of each hour. It triggers at zero second of the minute. Producing a count of repeats: 0, 1, 2.

    NOTE: minute parameter is validated lazily. Must be in range 0...59.

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

    Permalink
    Definition Classes
    AnyRef
  39. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  41. def once(implicit trace: ZTraceElement): WithState[Long, Any, Any, Unit]

    Permalink

    A schedule that recurs one time.

  42. def recurUntil[A, B](pf: PartialFunction[A, B])(implicit trace: ZTraceElement): WithState[Unit, Any, A, Option[B]]

    Permalink

    A schedule that recurs for until the input value becomes applicable to partial function and then map that value with given function.

  43. def recurUntil[A](f: (A) ⇒ Boolean)(implicit trace: ZTraceElement): WithState[Unit, Any, A, A]

    Permalink

    A schedule that recurs for until the predicate evaluates to true.

  44. def recurUntilEquals[A](a: ⇒ A)(implicit trace: ZTraceElement): WithState[Unit, Any, A, A]

    Permalink

    A schedule that recurs for until the predicate is equal.

  45. def recurUntilZIO[Env, A](f: (A) ⇒ URIO[Env, Boolean])(implicit trace: ZTraceElement): WithState[Unit, Env, A, A]

    Permalink

    A schedule that recurs for until the predicate evaluates to true.

  46. def recurWhile[A](f: (A) ⇒ Boolean)(implicit trace: ZTraceElement): WithState[Unit, Any, A, A]

    Permalink

    A schedule that recurs for as long as the predicate evaluates to true.

  47. def recurWhileEquals[A](a: ⇒ A)(implicit trace: ZTraceElement): WithState[Unit, Any, A, A]

    Permalink

    A schedule that recurs for as long as the predicate is equal.

  48. def recurWhileZIO[Env, A](f: (A) ⇒ URIO[Env, Boolean]): WithState[Unit, Env, A, A]

    Permalink

    A schedule that recurs for as long as the effectful predicate evaluates to true.

  49. def recurs(n: Int)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    A schedule spanning all time, which can be stepped only the specified number of times before it terminates.

  50. def recurs(n: Long)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    A schedule spanning all time, which can be stepped only the specified number of times before it terminates.

  51. def secondOfMinute(second0: ⇒ Int)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    Cron-like schedule that recurs every specified second of each minute.

    Cron-like schedule that recurs every specified second of each minute. It triggers at zero nanosecond of the second. Producing a count of repeats: 0, 1, 2.

    NOTE: second parameter is validated lazily. Must be in range 0...59.

  52. def spaced(duration: zio.Duration)(implicit trace: ZTraceElement): WithState[Long, Any, Any, Long]

    Permalink

    Returns a schedule that recurs continuously, each repetition spaced the specified duration from the last run.

  53. def stop(implicit trace: ZTraceElement): WithState[Long, Any, Any, Unit]

    Permalink

    A schedule that does not recur, it just stops.

  54. def succeed[A](a: ⇒ A)(implicit trace: ZTraceElement): WithState[Long, Any, Any, A]

    Permalink

    Returns a schedule that repeats one time, producing the specified constant value.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  57. def unfold[A](a: ⇒ A)(f: (A) ⇒ A): WithState[A, Any, Any, A]

    Permalink

    Unfolds a schedule that repeats one time from the specified state and iterator.

  58. def upTo(duration: zio.Duration)(implicit trace: ZTraceElement): WithState[Option[OffsetDateTime], Any, Any, zio.Duration]

    Permalink

    A schedule that recurs during the given duration

  59. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. def windowed(interval: zio.Duration): WithState[(Option[Long], Long), Any, Any, Long]

    Permalink

    A schedule that divides the timeline to interval-long windows, and sleeps until the nearest window boundary every time it recurs.

    A schedule that divides the timeline to interval-long windows, and sleeps until the nearest window boundary every time it recurs.

    For example, windowed(10.seconds) would produce a schedule as follows:

         10s        10s        10s       10s
    |----------|----------|----------|----------|
    |action------|sleep---|act|-sleep|action----|
    

Deprecated Value Members

  1. def collectUntilM[Env, A](f: (A) ⇒ URIO[Env, Boolean])(implicit trace: ZTraceElement): WithState[(Unit, Chunk[A]), Env, A, Chunk[A]]

    Permalink

    A schedule that recurs until the effectful condition f fails, collecting all inputs into a list.

    A schedule that recurs until the effectful condition f fails, collecting all inputs into a list.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use collectUntilZIO

  2. def collectWhileM[Env, A](f: (A) ⇒ URIO[Env, Boolean])(implicit trace: ZTraceElement): WithState[(Unit, Chunk[A]), Env, A, Chunk[A]]

    Permalink

    A schedule that recurs as long as the effectful condition holds, collecting all inputs into a list.

    A schedule that recurs as long as the effectful condition holds, collecting all inputs into a list.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use collectWhileZIO

  3. def recurUntilM[Env, A](f: (A) ⇒ URIO[Env, Boolean])(implicit trace: ZTraceElement): WithState[Unit, Env, A, A]

    Permalink

    A schedule that recurs for until the predicate evaluates to true.

    A schedule that recurs for until the predicate evaluates to true.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use recurUntilZIO

  4. def recurWhileM[Env, A](f: (A) ⇒ URIO[Env, Boolean]): WithState[Unit, Env, A, A]

    Permalink

    A schedule that recurs for as long as the effectful predicate evaluates to true.

    A schedule that recurs for as long as the effectful predicate evaluates to true.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use recurWhileZIO

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped