Package org.mockserver.state.infinispan
Class InfinispanStateBackendRegistrar
java.lang.Object
org.mockserver.state.infinispan.InfinispanStateBackendRegistrar
Registers the
InfinispanStateBackend with the core
StateBackendFactory so that stateBackend=infinispan
selects it. Call register() at application startup (or
use the static initializer block, which fires when this class is
loaded — the class is loaded when it appears on the classpath and
the factory's create() method resolves the backend name).
This design keeps mockserver-core free of any Infinispan
dependency: the core factory uses a volatile-registry pattern, and
this module registers itself into it.
Phase 2c: the factory now passes the full Configuration
to InfinispanStateBackend so it can inspect clustering config
(clusterEnabled, clusterName, clusterTransportConfig).
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeregister the Infinispan factory, reverting to the default in-memory backend (primarily for tests).static voidregister()Register the Infinispan factory withStateBackendFactory.
-
Method Details
-
register
public static void register()Register the Infinispan factory withStateBackendFactory. Idempotent — safe to call multiple times. -
deregister
public static void deregister()Deregister the Infinispan factory, reverting to the default in-memory backend (primarily for tests).
-