Enum Class ResidencyPolicy

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

public enum ResidencyPolicy extends Enum<ResidencyPolicy>
The strictness with which a send honours data-residency constraints when a subscription's region cannot be resolved.

This enum governs only the unresolved case. A subscription whose region is known is always sent from within its residency ceiling, and a filter that spans several known regions is always split and sent per region — that is the residency invariant, not a policy, and no value of this enum relaxes it. What differs between these values is what happens to a subscription whose region the directory cannot place.

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

    • MUST

      public static final ResidencyPolicy MUST
      Residency is mandatory. A subscription whose region cannot be resolved with certainty is not sent: it is reported UNRESOLVABLE_RESIDENCY and logged. The broadcast-and-claim fallback is forbidden, because a claim of ownership is not a proof of legal residency. This is the correct setting for jurisdictions with a hard data-location requirement, and it is the safe default: failing closed on unknown residency is never a compliance violation, whereas sending from an unverified location can be.
    • PREFERRED

      public static final ResidencyPolicy PREFERRED
      Residency is honoured where it can be, and where it cannot be resolved the send falls back (to broadcast-and-claim, or to local delivery, per server policy) and records that residency was assumed rather than verified. This is for contexts where a delivered notification matters more than strict data locality, and the assumption is acceptable if logged.
    • DONT_CARE

      public static final ResidencyPolicy DONT_CARE
      No residency constraint. An unresolved subscription is delivered locally by convenience. This is for jurisdictions with no data-location requirement.
  • Field Details

    • DEFAULT

      public static final ResidencyPolicy DEFAULT
      The default residency policy: MUST. Failing closed on unknown residency is the safe default, because it can never be a compliance violation whereas failing open can.
  • Method Details

    • values

      public static ResidencyPolicy[] 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 ResidencyPolicy 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