Class PluginStats
java.lang.Object
org.frontcache.io.PluginStats
One plugin as
get-node-stats reports it: what it is (from its manifest), its state, and its counters.
The counters are the process's - a reload does not reset them.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringgetDecideState(): its predicates answer.static final StringgetDecideState(): switched off for going over its budget or throwing - its rules do not match.static final StringgetSource(): on the core's class path - the war'sWEB-INF/lib, a filter-mode application's.static final StringgetSource(): from the node's plugin directory,FRONTCACHE_HOME/plugins/<id>/.static final StringgetState(): a plugin directory thatfront-cache.pluginsdoes not list - found, not loaded. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionserve: the challenge providers its manifest offers to achallenge <provider>guard rule.The plugin's config file underconf/, as its manifest names it; null when it has none.Why the last read was refused; empty otherwise.longWhen the config the plugin runs on was accepted, epoch milliseconds; 0 when never.The last read ofgetConfig():ok,absent(no file - the plugin got an empty config),refused(seegetConfigErrors(); at a start the plugin is then not started, on a reload it keeps the config it had), or null when it has not been read yet or the plugin has no config.serve: the cookies its manifest names - the only ones it reads, sets and has signed.longdecide: its budget,front-cache.plugins.<id>.decide-budget, in microseconds.longdecide: calls into its predicates since the process started.longdecide: calls that threw.doubledecide: its predicates' p99 over the last minute judged, in microseconds; -1 before the first.decide: why it was last switched off - the p99 or the error rate; null when it never was.longdecide: while "over-budget", when it is tried again (epoch millis); 0 otherwise.longdecide: how many times it was switched off.A dropped-in plugin's directory, relative to the plugin directory's parent (plugins/geoip); else null.longlonglonggetId()getJars()A dropped-in plugin's jars, each<file name> <sha256>; empty for a bundled one.getKinds()The declared kinds, as a manifest spells them:observe,manage, ...SPDX, as the plugin states it.getName()intdecide: the names of theext:<name>:predicates it offers; empty until it starts.Why it failed or was refused; null otherwise.longserve: requests its endpoint answered.longserve: requests its endpoint failed - it threw, or wrote more than the node buffers (503).longserve: requests refused before its endpoint - over its concurrency cap (503) or body limit (413).getState()booleanisLegacy()A pre-2.13FrontcacheModulewithout a manifest, run through the deprecated adapter.booleanisPinned()Whetherfront-cache.plugins.<id>.sha256pinned its jars (and they matched - else it is refused).booleanWhether a declared kind runs on the request path (decide / transform / replace) - shown as a badge.booleanisServes()serve: whether its endpoint answers/fc-x/<id>/- false while it is not started.voidsetChallenges(List<String> challenges) voidvoidsetConfigErrors(List<String> configErrors) voidsetConfigLoaded(long configLoaded) voidsetConfigStatus(String configStatus) voidsetCookies(List<String> cookies) voidsetDecideBudgetMicros(long decideBudgetMicros) voidsetDecideCalls(long decideCalls) voidsetDecideErrors(long decideErrors) voidsetDecideP99Micros(double decideP99Micros) voidsetDecideReason(String decideReason) voidsetDecideRetryAt(long decideRetryAt) voidsetDecideState(String decideState) voidsetDecideSwitchedOff(long decideSwitchedOff) voidsetDirectory(String directory) voidsetErrors(long errors) voidsetEventsDelivered(long eventsDelivered) voidsetEventsDropped(long eventsDropped) voidvoidvoidvoidsetLegacy(boolean legacy) voidsetLicense(String license) voidvoidsetPinned(boolean pinned) voidsetPluginApi(int pluginApi) voidsetPredicates(List<String> predicates) voidvoidsetRequestPath(boolean requestPath) voidsetServed(long served) voidsetServeFailed(long serveFailed) voidsetServeRefused(long serveRefused) voidsetServes(boolean serves) voidvoidvoidvoidsetVersion(String version)
-
Field Details
-
SOURCE_BUNDLED
getSource(): on the core's class path - the war'sWEB-INF/lib, a filter-mode application's.- See Also:
-
SOURCE_DROPPED_IN
getSource(): from the node's plugin directory,FRONTCACHE_HOME/plugins/<id>/.- See Also:
-
STATE_NOT_ENABLED
getState(): a plugin directory thatfront-cache.pluginsdoes not list - found, not loaded.- See Also:
-
DECIDE_OK
-
DECIDE_OVER_BUDGET
getDecideState(): switched off for going over its budget or throwing - its rules do not match.- See Also:
-
-
Constructor Details
-
PluginStats
public PluginStats()
-
-
Method Details
-
getId
-
setId
-
getName
-
setName
-
getVersion
-
setVersion
-
getVendor
-
setVendor
-
getLicense
SPDX, as the plugin states it. -
setLicense
-
getPluginApi
public int getPluginApi() -
setPluginApi
public void setPluginApi(int pluginApi) -
getKinds
-
setKinds
-
isRequestPath
public boolean isRequestPath()Whether a declared kind runs on the request path (decide / transform / replace) - shown as a badge. -
setRequestPath
public void setRequestPath(boolean requestPath) -
getState
-
setState
-
getReason
Why it failed or was refused; null otherwise. -
setReason
-
isLegacy
public boolean isLegacy()A pre-2.13FrontcacheModulewithout a manifest, run through the deprecated adapter. -
setLegacy
public void setLegacy(boolean legacy) -
getEventsDelivered
public long getEventsDelivered() -
setEventsDelivered
public void setEventsDelivered(long eventsDelivered) -
getEventsDropped
public long getEventsDropped() -
setEventsDropped
public void setEventsDropped(long eventsDropped) -
getErrors
public long getErrors() -
setErrors
public void setErrors(long errors) -
getConfig
The plugin's config file underconf/, as its manifest names it; null when it has none. -
setConfig
-
getConfigStatus
The last read ofgetConfig():ok,absent(no file - the plugin got an empty config),refused(seegetConfigErrors(); at a start the plugin is then not started, on a reload it keeps the config it had), or null when it has not been read yet or the plugin has no config. -
setConfigStatus
-
getConfigErrors
-
setConfigErrors
-
getConfigLoaded
public long getConfigLoaded()When the config the plugin runs on was accepted, epoch milliseconds; 0 when never. -
setConfigLoaded
public void setConfigLoaded(long configLoaded) -
isServes
public boolean isServes()serve: whether its endpoint answers/fc-x/<id>/- false while it is not started. -
setServes
public void setServes(boolean serves) -
getCookies
-
setCookies
-
getChallenges
-
setChallenges
-
getServed
public long getServed()serve: requests its endpoint answered. -
setServed
public void setServed(long served) -
getServeRefused
public long getServeRefused()serve: requests refused before its endpoint - over its concurrency cap (503) or body limit (413). -
setServeRefused
public void setServeRefused(long serveRefused) -
getServeFailed
public long getServeFailed()serve: requests its endpoint failed - it threw, or wrote more than the node buffers (503). -
setServeFailed
public void setServeFailed(long serveFailed) -
getSource
-
setSource
-
getDirectory
A dropped-in plugin's directory, relative to the plugin directory's parent (plugins/geoip); else null. -
setDirectory
-
getJars
-
setJars
-
isPinned
public boolean isPinned()Whetherfront-cache.plugins.<id>.sha256pinned its jars (and they matched - else it is refused). -
setPinned
public void setPinned(boolean pinned) -
getPredicates
-
setPredicates
-
getDecideState
-
setDecideState
-
getDecideReason
decide: why it was last switched off - the p99 or the error rate; null when it never was. -
setDecideReason
-
getDecideBudgetMicros
public long getDecideBudgetMicros()decide: its budget,front-cache.plugins.<id>.decide-budget, in microseconds. -
setDecideBudgetMicros
public void setDecideBudgetMicros(long decideBudgetMicros) -
getDecideP99Micros
public double getDecideP99Micros()decide: its predicates' p99 over the last minute judged, in microseconds; -1 before the first. -
setDecideP99Micros
public void setDecideP99Micros(double decideP99Micros) -
getDecideCalls
public long getDecideCalls()decide: calls into its predicates since the process started. -
setDecideCalls
public void setDecideCalls(long decideCalls) -
getDecideErrors
public long getDecideErrors()decide: calls that threw. -
setDecideErrors
public void setDecideErrors(long decideErrors) -
getDecideSwitchedOff
public long getDecideSwitchedOff()decide: how many times it was switched off. -
setDecideSwitchedOff
public void setDecideSwitchedOff(long decideSwitchedOff) -
getDecideRetryAt
public long getDecideRetryAt()decide: while "over-budget", when it is tried again (epoch millis); 0 otherwise. -
setDecideRetryAt
public void setDecideRetryAt(long decideRetryAt)
-