Interface FrontcacheModule
Deprecated.
A module that plugs into a node from its own jar - found with
ServiceLoader through
META-INF/services/org.frontcache.module.FrontcacheModule.
Never on the request path
Nothing here is called while a request is served: a module gets the node's lifecycle, management actions, and meters - nothing inFrontCacheEngine.init(), the cache or include processors, the
guard or the resilience commands. A node with no module serves exactly what a node with one serves.
A module cannot stop a node
org.frontcache.plugin.host.FrontcachePlugins catches everything a module throws. A module that throws in start(ModuleContext) is
logged and dropped until the next start; the node starts regardless.
One instance per process
A module is instantiated once, likeFCConfig and the cache processor, and outlives an engine:
the reload action calls stop(false) then start(...) on the same instance. The
constructor must be cheap and side-effect free - it may run from a servlet's init, before any engine.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbindMeters(Object meterRegistry) Deprecated.Registers this module's series on the metrics exporter's registry - anio.micrometer.core.instrument.MeterRegistry, typedObjectso this interface carries no Micrometer type.id()Deprecated.A short, stable id - for logs and themoduleslist ofget-node-stats.default Map<String, ManagementAction> Deprecated.Management actions this module answers, by action name.default voidonModeKnown(NodeMode mode) Deprecated.The servlet or filter has told the node how it is deployed.voidstart(ModuleContext context) Deprecated.The engine has started: the cache processor exists, metrics export has not been started yet.voidstop(boolean shutdown) Deprecated.
-
Method Details
-
id
-
start
Deprecated.The engine has started: the cache processor exists, metrics export has not been started yet. -
stop
void stop(boolean shutdown) Deprecated.- Parameters:
shutdown- true when the process is going away; false whenreloadis about to start a replacement engine - process-wide state should survive
-
onModeKnown
Deprecated.The servlet or filter has told the node how it is deployed. Not necessarily beforestart(ModuleContext): no servlet is load-on-startup, so whichever sees the first request builds the engine. Called again only if the mode changes. -
managementActions
Deprecated.Management actions this module answers, by action name. Consulted after the core's own actions and before the ping fallback, so a name the core owns can never be shadowed. The caller has already passedApiKey.isAuthorized; whether it may also write is on the request. -
bindMeters
Deprecated.Registers this module's series on the metrics exporter's registry - anio.micrometer.core.instrument.MeterRegistry, typedObjectso this interface carries no Micrometer type. Called once per exporter, possibly beforestart(ModuleContext); meters must read state at scrape time rather than capture it now. Names are prefixedfrontcache.by the registry.
-
FrontcachePluginand ship aMETA-INF/frontcache-plugin.propertiesmanifest. A module without one still runs, through an adapter, as amanageplugin - for one release.