java.lang.Object
net.i2p.router.web.GraphRenderer.GraphRenderConfig.Builder
Enclosing class:
GraphRenderer.GraphRenderConfig

static final class GraphRenderer.GraphRenderConfig.Builderextends Object
Mutable counterpart of GraphRenderer.GraphRenderConfig; every setter returns itself.
  • Field Details

    • start

      long start
      Window start, in wall-clock ms.
    • end

      long end
      Window end, in wall-clock ms.
    • period

      long period
      The rate's period in ms, which is also the archive step.
    • width

      int width
      Frame width in pixels.
    • height

      int height
      Frame height in pixels.
    • periodCount

      int periodCount
      Periods in the window.
    • theme

      String theme
      Console theme name every colour, font and width is read from.
    • hideLegend

      boolean hideLegend
      True to omit the legend, and with it the summary block and the restart markers.
    • hideGrid

      boolean hideGrid
      True to omit the grid lines.
    • hideTitle

      boolean hideTitle
      True to omit the title derived from the stat name.
    • showEvents

      boolean showEvents
      True to plot the event count instead of the stat itself.
    • showCredit

      boolean showCredit
      True to keep rrd4j's signature line.
    • showRestarts

      boolean showRestarts
      True to rule off each router restart inside the window.
    • titleOverride

      String titleOverride
      Title to draw, or null to derive one from the stat name.
    • rate

      Rate rate
      The tracked rate, for its period, stat name and description.
    • extras

      Extra series of a combined graph, in legend order.
    • allLines

      boolean allLines
      True to draw the primary as a line rather than a filled area.
    • fillSeries

      boolean fillSeries
      True to render every series as a filled path under a thin line.
    • useUtc

      boolean useUtc
      True to label the axis and the dates in UTC.
    • smooth

      boolean smooth
      True to interpolate between samples instead of stepping.
    • meta

      boolean meta
      Emit the plot geometry and series as JSON instead of drawing the image.
    • forceZero

      boolean forceZero
      True to keep the historical zero-floored y-axis.
    • lang

      String lang
      Active UI language code, which selects the fonts and the translated title.
    • listener

      GraphListener listener
      The listener holding the RRD: the datasource, the archive rows and the clock.
  • Constructor Details

  • Method Details

    • start

      Sets when the plotted window begins.
      Parameters:
      v - window start, in wall-clock ms
      Returns:
      this builder, for chaining calls
    • end

      Sets when the plotted window ends.
      Parameters:
      v - window end, in wall-clock ms
      Returns:
      this builder, for chaining calls
    • period

      Sets the archive step the window is measured in.
      Parameters:
      v - the rate's period in ms, which is also the archive step
      Returns:
      this builder, for chaining calls
    • width

      Sets the frame width.
      Parameters:
      v - frame width in pixels
      Returns:
      this builder, for chaining calls
    • height

      Sets the frame height.
      Parameters:
      v - frame height in pixels
      Returns:
      this builder, for chaining calls
    • periodCount

      Sets how many periods the window covers.
      Parameters:
      v - periods in the window
      Returns:
      this builder, for chaining calls
    • theme

      Selects the theme the frame is drawn in.
      Parameters:
      v - console theme name every colour, font and width is read from
      Returns:
      this builder, for chaining calls
    • hideLegend

      Chooses whether the legend, and everything drawn with it, is omitted.
      Parameters:
      v - true to omit the legend and everything drawn with it
      Returns:
      this builder, for chaining calls
    • hideGrid

      Chooses whether the grid lines are omitted.
      Parameters:
      v - true to omit the grid lines
      Returns:
      this builder, for chaining calls
    • hideTitle

      Chooses whether the title derived from the stat name is omitted.
      Parameters:
      v - true to omit the title derived from the stat name
      Returns:
      this builder, for chaining calls
    • showEvents

      Chooses whether the event count is plotted instead of the stat.
      Parameters:
      v - true to plot the event count instead of the stat itself
      Returns:
      this builder, for chaining calls
    • showCredit

      Chooses whether rrd4j's signature line is kept.
      Parameters:
      v - true to keep rrd4j's signature line
      Returns:
      this builder, for chaining calls
    • showRestarts

      GraphRenderer.GraphRenderConfig.Builder showRestarts(boolean v)
      Chooses whether each router restart is ruled off.
      Parameters:
      v - true to rule off each router restart inside the window
      Returns:
      this builder, for chaining calls
    • titleOverride

      Sets the title, replacing the one derived from the stat name.
      Parameters:
      v - title to draw, or null to derive one from the stat name
      Returns:
      this builder, for chaining calls
    • rate

      Sets the rate this pass plots.
      Parameters:
      v - the tracked rate, for its period, stat name and description
      Returns:
      this builder, for chaining calls
    • extras

      Plot a list of extra series alongside the primary.
      Parameters:
      v - extra series to plot on the same graph, or null/empty for none
      Returns:
      this builder, for chaining calls
    • allLines

      Draw the primary as a line rather than as a filled area.
      Parameters:
      v - true to draw the primary as a line instead of a filled area
      Returns:
      this builder, for chaining calls
    • fillSeries

      Draw every series as a filled path under a thin line.
      Parameters:
      v - render every series as a filled path under a thin line
      Returns:
      this builder, for chaining calls
    • lsnr2

      Plot one extra series alongside the primary, wrapped into the extras list.
      Parameters:
      v - single extra series to plot on the same graph, or null
      Returns:
      this builder, for chaining calls
    • useUtc

      Label the axis and the dates in UTC.
      Parameters:
      v - true to label the axis and the dates in UTC
      Returns:
      this builder, for chaining calls
    • smooth

      Interpolate between samples instead of stepping.
      Parameters:
      v - true to interpolate between samples instead of stepping
      Returns:
      this builder, for chaining calls
    • meta

      Ask for the plot metadata rather than a drawing.
      Parameters:
      v - true to emit JSON
      Returns:
      this builder, for chaining calls
    • forceZero

      Keep the historical zero-floored y-axis.
      Parameters:
      v - true to keep the historical zero-floored y-axis
      Returns:
      this builder, for chaining calls
    • lang

      Select the fonts and the translated title for one language.
      Parameters:
      v - active UI language code
      Returns:
      this builder, for chaining calls
    • listener

      Name the listener whose RRD this pass plots.
      Parameters:
      v - the listener holding the RRD to plot
      Returns:
      this builder, for chaining calls
    • build

      Freeze what has been set so far.
      Returns:
      the immutable configuration this builder has accumulated