Class PluginStats

java.lang.Object
org.frontcache.io.PluginStats

public class PluginStats extends Object
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 Details

  • Constructor Details

    • PluginStats

      public PluginStats()
  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getVersion

      public String getVersion()
    • setVersion

      public void setVersion(String version)
    • getVendor

      public String getVendor()
    • setVendor

      public void setVendor(String vendor)
    • getLicense

      public String getLicense()
      SPDX, as the plugin states it.
    • setLicense

      public void setLicense(String license)
    • getPluginApi

      public int getPluginApi()
    • setPluginApi

      public void setPluginApi(int pluginApi)
    • getKinds

      public List<String> getKinds()
      The declared kinds, as a manifest spells them: observe, manage, ...
    • setKinds

      public void setKinds(List<String> kinds)
    • 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

      public String getState()
      loaded, started, failed, refused, stopped or "not-enabled".
    • setState

      public void setState(String state)
    • getReason

      public String getReason()
      Why it failed or was refused; null otherwise.
    • setReason

      public void setReason(String reason)
    • isLegacy

      public boolean isLegacy()
      A pre-2.13 FrontcacheModule without 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

      public String getConfig()
      The plugin's config file under conf/, as its manifest names it; null when it has none.
    • setConfig

      public void setConfig(String config)
    • getConfigStatus

      public String getConfigStatus()
      The last read of getConfig(): ok, absent (no file - the plugin got an empty config), refused (see getConfigErrors(); 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

      public void setConfigStatus(String configStatus)
    • getConfigErrors

      public List<String> getConfigErrors()
      Why the last read was refused; empty otherwise.
    • setConfigErrors

      public void setConfigErrors(List<String> configErrors)
    • 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

      public List<String> getCookies()
      serve: the cookies its manifest names - the only ones it reads, sets and has signed.
    • setCookies

      public void setCookies(List<String> cookies)
    • getChallenges

      public List<String> getChallenges()
      serve: the challenge providers its manifest offers to a challenge <provider> guard rule.
    • setChallenges

      public void setChallenges(List<String> challenges)
    • 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

      public String getSource()
    • setSource

      public void setSource(String source)
    • getDirectory

      public String getDirectory()
      A dropped-in plugin's directory, relative to the plugin directory's parent (plugins/geoip); else null.
    • setDirectory

      public void setDirectory(String directory)
    • getJars

      public List<String> getJars()
      A dropped-in plugin's jars, each <file name> <sha256>; empty for a bundled one.
    • setJars

      public void setJars(List<String> jars)
    • isPinned

      public boolean isPinned()
      Whether front-cache.plugins.<id>.sha256 pinned its jars (and they matched - else it is refused).
    • setPinned

      public void setPinned(boolean pinned)
    • getPredicates

      public List<String> getPredicates()
      decide: the names of the ext:<name>: predicates it offers; empty until it starts.
    • setPredicates

      public void setPredicates(List<String> predicates)
    • getDecideState

      public String getDecideState()
      decide: "ok" or "over-budget"; null for a plugin that does not decide.
    • setDecideState

      public void setDecideState(String decideState)
    • getDecideReason

      public String getDecideReason()
      decide: why it was last switched off - the p99 or the error rate; null when it never was.
    • setDecideReason

      public void setDecideReason(String decideReason)
    • 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)