Conflux
Conflux is a lightweight, type-safe, generic application-wide context for Java, providing strongly-typed key/value storage, listener support, and thread-safe sharing of data. It helps coordinate shared state across otherwise decoupled classes.
Features
- Strongly typed keys - no unsafe casting
- Type-consistent storage - values always match their declared key type
- Change notifications - listeners (held via weak references) react to updates without memory leaks
- Thread-safe - built on concurrent data structures
- Simple singleton API - provided via an enum instance
- Ephemeral named contexts - create multiple independent, short-lived contexts for modular scoping (per user, per request, per transaction)
Quick Link
Example
Enjoy consistent, simple context management!