Enum Class LoomProfile
- All Implemented Interfaces:
Serializable, Comparable<LoomProfile>, Constable
BLK-2026-04-22-008: deployment profile flag controlling whether v2.0 GA enforces
production-only safety constraints or runs in permissive development/test mode.
Two profiles are recognized:
DEVELOPMENT— current behavior: TLS opt-in, mTLS opt-in, gateway-trust evaluated before cert auth, ACTIVE_ACTIVE WAN allowed, cross-group transactions allowed, etc. Suitable for unit tests, CI, single-node dev clusters, and any environment where strict safety would block the workflow after explicitly selecting development mode.PRODUCTION— strict mode: features known to have unfixed v2.0 correctness issues throwIllegalStateExceptionat config time so the operator surfaces the limitation immediately rather than discovering it after data corruption. Currently rejects:- ACTIVE_ACTIVE WAN replication topologies (BLK-2026-04-22-006).
Resolution: the profile is read from the JVM system property
loomcache.profile (case-insensitive). Unset values are accepted only while
running under the test harness, where they resolve to DEVELOPMENT; outside
tests the profile must be explicit. Unknown values always fail fast. The value is
cached on first read; restart the JVM to change profile.
Thread safety: immutable enum, lazily resolved via the JVM holder idiom. Safe for hot-path use without synchronization.
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPermissive — current pre-v2.0 behavior.Strict — v2.0 GA production safety profile. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic LoomProfilecurrent()Returns the active profile for this JVM.static LoomProfileResolve the active profile from the current JVM properties without using the cached holder.booleanbooleanstatic LoomProfileReturns the enum constant of this class with the specified name.static LoomProfile[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEVELOPMENT
Permissive — current pre-v2.0 behavior. Used by unit tests, CI, dev clusters, and any single-node setup after explicit opt-in outside tests. -
PRODUCTION
Strict — v2.0 GA production safety profile. Refuses to start with configurations known to have unfixed correctness issues (currently: ACTIVE_ACTIVE WAN).
-
-
Field Details
-
SYSTEM_PROPERTY
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
current
Returns the active profile for this JVM. Resolved on first call from theloomcache.profilesystem property. The profile must be explicit outside the Maven test harness so production typos cannot silently disable strict checks.- Returns:
- the active profile (never null)
-
fromSystemProperty
Resolve the active profile from the current JVM properties without using the cached holder. Use this in startup/configuration guards that are exercised directly by tests after mutating "loomcache.profile".- Returns:
- the active profile (never null)
-
isProduction
public boolean isProduction()- Returns:
trueif this profile isPRODUCTION
-
isDevelopment
public boolean isDevelopment()- Returns:
trueif this profile isDEVELOPMENT
-