Enum Class DeliveryUrgency

java.lang.Object
java.lang.Enum<DeliveryUrgency>
com.iizix.push.DeliveryUrgency
All Implemented Interfaces:
Serializable, Comparable<DeliveryUrgency>, Constable

public enum DeliveryUrgency extends Enum<DeliveryUrgency>
How hard the engine works to deliver a notification quickly.

Delivery urgency is a soft preference: it yields to authorization, to the residency invariant, and to ResidencyPolicy on conflict. It tunes the spool behaviour and whether a send may burst past the soft push throughput roof, but it never overrides a hard constraint. In particular a FAST send whose target region is unreachable under ResidencyPolicy.MUST is delayed, not redirected: the constraint wins, urgency degrades, and the result explains why.

Persistence note. This value is stored in a property container by ordinal() (see the enum-storage idiom in IPushSettings). The order of these constants is therefore part of the persisted and wire contract: new constants MUST be appended at the end, never inserted or reordered, or an existing stored value will silently change meaning.

Author:
IIZI
  • Enum Constant Details

    • FAST

      public static final DeliveryUrgency FAST
      Minimize latency. Dispatch each region slice the moment it is resolved rather than waiting for the full plan, do not batch, and accept a higher per-send cost. May be permitted to burst past the soft push throughput roof. For time-critical notifications such as a second-factor code or a fraud alert.
    • NORMAL

      public static final DeliveryUrgency NORMAL
      The default. Build the full routing plan, batch sensibly, respect the push throughput roof, and deliver in reasonable time. For the majority of notifications.
    • DONT_CARE

      public static final DeliveryUrgency DONT_CARE
      Throughput over latency. Batch aggressively, coalesce, and send when convenient; drain the queue when the server is idle. Respects the push roof strictly. For bulk, non-urgent sends such as a nightly digest, where no recipient is waiting and the server load matters more than the clock.
  • Field Details

  • Method Details

    • values

      public static DeliveryUrgency[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DeliveryUrgency valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null