Kombu.Clocks.Timetuple (Kombu v0.1.0)

Copy Markdown View Source

Event clock tuple (kombu.clocks.timetuple).

Summary

Types

t()

@type t() :: %Kombu.Clocks.Timetuple{
  clock: integer() | nil,
  id: String.t(),
  obj: term(),
  timestamp: float()
}

Functions

compare(timetuple1, timetuple2)

@spec compare(t(), t()) :: :lt | :eq | :gt

Compare two Timetuple structs according to Kombu's ordering rules:

  1. If both have non-nil/non-zero clock, compare by clock, breaking ties by id.
  2. Otherwise compare by timestamp.

ge?(a, b)

@spec ge?(t(), t()) :: boolean()

gt?(a, b)

@spec gt?(t(), t()) :: boolean()

le?(a, b)

@spec le?(t(), t()) :: boolean()

lt?(a, b)

@spec lt?(t(), t()) :: boolean()

new(clock, timestamp, id, obj \\ nil)

@spec new(integer() | nil, number(), String.t(), term()) :: t()

to_tuple(timetuple)

@spec to_tuple(t()) :: {integer() | nil, float(), String.t(), term()}