View Source Jackalope.WorkList.Expiration (jackalope v0.9.0)

Common functions for work lists.

Summary

Functions

Does the first expiration come after the second?

Recalculate an old expiration given the latest time before stop and the earliest time after restart. Assumes restart happened soon after stopping.

Types

@type expiration() :: non_neg_integer() | :infinity

Functions

@spec after?(expiration(), expiration()) :: boolean()

Does the first expiration come after the second?

@spec expiration(non_neg_integer() | :infinity) :: expiration()
@spec now() :: integer()
Link to this function

rebase_expiration(exp, stop_time, restart_time)

View Source
@spec rebase_expiration(expiration(), integer(), integer()) :: expiration()

Recalculate an old expiration given the latest time before stop and the earliest time after restart. Assumes restart happened soon after stopping.

Link to this function

unexpired?(item, expiration_fn)

View Source
@spec unexpired?(any(), (any() -> expiration())) :: boolean()