Class FrontcacheAction

java.lang.Object
org.frontcache.io.FrontcacheAction

public abstract class FrontcacheAction extends Object
  • Field Details

    • INVALIDATE

      public static final String INVALIDATE
      See Also:
    • DUMP_KEYS

      public static final String DUMP_KEYS
      See Also:
    • GET_FALLBACK_CONFIGS

      public static final String GET_FALLBACK_CONFIGS
      See Also:
    • GET_FALLBACKS_CONFIG

      public static final String GET_FALLBACKS_CONFIG
      The raw conf/fallbacks.conf, as GET_GUARD_CONFIG is to GET_GUARD_RULES: this one returns the file, GET_FALLBACK_CONFIGS returns the entries parsed from it. The two spellings are one letter apart and mean different things. The older one is plural because it counts ENTRIES; the plural here belongs to the file name.
      See Also:
    • RELOAD_FALLBACKS

      public static final String RELOAD_FALLBACKS
      See Also:
    • GET_CACHE_STATE

      public static final String GET_CACHE_STATE
      See Also:
    • GET_NODE_STATS

      public static final String GET_NODE_STATS
      The cheap, pollable companion of GET_CACHE_STATE: typed cache sizes plus the JVM's heap, CPU and uptime, all read from state the process already holds. get-cache-state opens a Lucene reader per call, which is fine for a console page and wrong for a poll loop.
      See Also:
    • GET_CACHED_KEYS

      public static final String GET_CACHED_KEYS
      See Also:
    • GET_FROM_CACHE

      public static final String GET_FROM_CACHE
      See Also:
    • PUT_TO_CACHE

      public static final String PUT_TO_CACHE
      See Also:
    • GET_BOTS

      public static final String GET_BOTS
      See Also:
    • GET_BOTS_CONFIG

      public static final String GET_BOTS_CONFIG
      The raw conf/bots.conf, as GET_GUARD_CONFIG is to GET_GUARD_RULES: this one returns the file, GET_BOTS returns what the node parsed out of it.
      See Also:
    • RELOAD_BOTS

      public static final String RELOAD_BOTS
      See Also:
    • GET_DYNAMIC_URLS

      public static final String GET_DYNAMIC_URLS
      See Also:
    • GET_DYNAMIC_URLS_CONFIG

      public static final String GET_DYNAMIC_URLS_CONFIG
      The raw conf/dynamic-urls.conf, as GET_GUARD_CONFIG is to GET_GUARD_RULES: this one returns the file, GET_DYNAMIC_URLS returns the patterns parsed from it.
      See Also:
    • GET_RESILIENCE_CONFIGS

      public static final String GET_RESILIENCE_CONFIGS
      See Also:
    • GET_HYSTRIX_CONFIGS

      @Deprecated public static final String GET_HYSTRIX_CONFIGS
      Deprecated.
      Pre-2.7 spelling of GET_RESILIENCE_CONFIGS, still accepted. The console is deployed separately from the nodes it reads, so a 2.6 console asking a 2.7 node has to keep working - an unrecognized action answers with a ping response, which would render the panel empty with no error. Kept until no supported console predates 2.7.
      See Also:
    • GET_GUARD_RULES

      public static final String GET_GUARD_RULES
      See Also:
    • GET_GUARD_CONFIG

      public static final String GET_GUARD_CONFIG
      See Also:
    • RELOAD_GUARD_RULES

      public static final String RELOAD_GUARD_RULES
      See Also:
    • SET_CONFIG

      public static final String SET_CONFIG
      Writes one config file and (unless apply=false) applies it - the console's Configs screens save through this. One action for all five files, and the file parameter is a logical id, never a path or a file name - resilience, guard-rules, bots, dynamic-urls, fallbacks. The read side has five actions because each returns a differently-named field for wire-format reasons that predate the current shape; the write side has one uniform outcome, so five actions would be one operation spelled five times. And a caller-supplied file name - even one checked for .. - is how this becomes an arbitrary file write on a node, so it is not accepted at all. Unlike every other action here this one refuses a node with no API key configured, where ApiKey.isAuthorized allows it. See ApiKey.isAuthorizedToWrite.
      See Also:
    • RELOAD_RESILIENCE

      public static final String RELOAD_RESILIENCE
      Re-reads ./conf/resilience.properties and applies what can be applied without a restart. New because there was no way to apply that file at all: it is read once into a cached singleton and two further caches are built from it. See FcResilienceReload.
      See Also:
    • RELOAD_DYNAMIC_URLS

      public static final String RELOAD_DYNAMIC_URLS
      Re-reads ./conf/dynamic-urls.conf. New for the same reason: the file is read by FCConfig's static initializer, and the reload action does NOT re-read it (the FCConfig.init() call in FrontCacheEngine is commented out), so adding a pattern meant restarting the node.
      See Also:
    • WARMER_STATUS

      public static final String WARMER_STATUS
      State, run parameters, counters, rate, ETA, recent failures, last run, resumable checkpoint.
      See Also:
    • WARMER_LISTS

      public static final String WARMER_LISTS
      The URI lists under ./warmer, with entry counts.
      See Also:
    • GET_WARMER_LIST

      public static final String GET_WARMER_LIST
      One list: the whole content when small enough to edit, else a head/tail preview; grep= searches, raw=true streams it.
      See Also:
    • PUT_WARMER_LIST

      public static final String PUT_WARMER_LIST
      Creates or replaces one list. The list is the request BODY (text/plain), with action, name and baseHash in the query string - not a form field, because Jetty refuses a form body over 200,000 bytes and a list will reach that.
      See Also:
    • DELETE_WARMER_LIST

      public static final String DELETE_WARMER_LIST
      See Also:
    • WARMER_PREFLIGHT

      public static final String WARMER_PREFLIGHT
      What a run would do, without calling the origin - the Run panel's Check.
      See Also:
    • WARMER_START

      public static final String WARMER_START
      Starts a run: list, mode, keyBase, clientType, delayMs, concurrency[, resumeFromLine]. Requires a configured API key (ApiKey.isAuthorizedToWrite), like set-config and unlike invalidate: a 50k-entry run is 50,000 origin renders ordered by one request, and an un-keyed node - usually un-keyed by accident - should not be an amplifier for whoever can reach it.
      See Also:
    • WARMER_UPDATE

      public static final String WARMER_UPDATE
      Changes delayMs and/or concurrency of the running run.
      See Also:
    • WARMER_PAUSE

      public static final String WARMER_PAUSE
      See Also:
    • WARMER_RESUME

      public static final String WARMER_RESUME
      See Also:
    • WARMER_STOP

      public static final String WARMER_STOP
      Lets in-flight requests finish, closes the failed list, writes the checkpoint.
      See Also:
    • PATCH

      public static final String PATCH
      See Also:
    • PURGE

      public static final String PURGE
      See Also:
    • BACKUP_INDEX

      public static final String BACKUP_INDEX
      See Also:
    • PING

      public static final String PING
      See Also:
    • HELP

      public static final String HELP
      See Also:
    • actionsDescriptionMap

      public static Map<String,String> actionsDescriptionMap
  • Constructor Details

    • FrontcacheAction

      public FrontcacheAction()