Registries store validated event classes after they have been classified into an event family.
The base contract, EventRegistryInterface, exposes only:
family()register()has()all()
There is no removal API.
LockableEventRegistryInterface adds:
lock()isLocked()
Once locked, a registry rejects further registrations with RegistryLockedException.
The package provides two concrete registries:
KernelEventRegistryforEventFamily::KernelStateProcessEventRegistryforEventFamily::Process
The base implementation, AbstractLockableEventRegistry, enforces:
- family segregation
- duplicate protection
- lock state checks
Registering a process event in the kernel registry, or the reverse, fails with EventFamilyMismatchException.
ProcessEventRegistry implements AdditiveOnlyEventRegistryInterface. This expresses that process registries are open to additions but not designed for unregister semantics.
That additive-only behavior is reflected structurally:
- registration is supported
- removal is absent
- tests assert the additive-only contract is advertised
The architecture distinguishes two phases:
- kernel-state events are typically finalized earlier
- process events may remain open longer for additive extension
The current implementation provides the locking mechanism but does not schedule those phases itself. The caller or integrating framework decides when each registry is locked.
Related: