Class WebEngineStats

java.lang.Object
com.iizix.server.webengine.WebEngineStats

public final class WebEngineStats extends Object
The counts of the web engines the client sessions of this server arrived on: how many are connected now and how many connected since the server started, per status and per group row (design CC-DESIGN-WEBVIEW-WARNING section 8.2, work order CC-WEBENGINE-SERVER). This is what ServerAdmin shows: the ruling asks for "how many sessions arrive unpatched".

In memory, since the server started (design D-11). Nothing is persisted: the counts start at zero with the server and the log line of WebEngineAdvisor is the history. In a hub cluster each server has its own counts.

A group row is one combination of application, platform, product, OS major, engine major and status: "demo, Android, Android System WebView, 7, 119, ENDED". A session is counted in exactly one row, and in the totals of its status:

Bounded. The OS and engine majors of a row come from the client's user agent, which the peer controls, so the number of rows is capped at 1000: a session whose row would be one too many is counted in the shared overflow row of its status (application null) and in the totals, which are always exact.

Thread safe: every method takes the one monitor of the instance, held for a map lookup and a few additions. No clock inside: "now" is a parameter.

Author:
Christopher Mindus
  • Field Details

    • MAX_ROWS

      public static final int MAX_ROWS
      The most group rows kept; sessions beyond are counted in the overflow row of their status, of which there is one per status on top of these.
      See Also:
  • Constructor Details

    • WebEngineStats

      public WebEngineStats(Instant since)
      Creates the counts, all zero.
      Parameters:
      since - When counting starts: the server start.
  • Method Details