Class Value.Parameters

  • Enclosing class:
    Value

    public static class Value.Parameters
    extends java.lang.Object
    Parameters for building Value instances. All settings are classes instead of primitive types to allow tri-state logic (true, false, unset).
    • Constructor Detail

      • Parameters

        public Parameters()
        Get a fresh Parameters instance with all features turned/unset. Parameters instances may be recycled for construction multiple Value instances, but do note any Limits instance added must be frozen.
    • Method Detail

      • setLogRaw

        public Value.Parameters setLogRaw​(java.lang.Boolean logRaw)
        (De-)Activate logging of raw values. Raw values are basically the last value logged.
        Returns:
        "this" for call chaining
      • setLogSum

        public Value.Parameters setLogSum​(java.lang.Boolean logSum)
        (De-)Activate logging the sum of all data points for each interval.
        Returns:
        "this" for call chaining
      • setLogMean

        public Value.Parameters setLogMean​(java.lang.Boolean logMean)
        (De)-activate loging the mean value for each interval.
        Returns:
        "this" for call chaining
      • setLogMax

        public Value.Parameters setLogMax​(java.lang.Boolean logMax)
        (De-)Activate logging the maximal value observed for each interval.
        Returns:
        "this" for call chaining
      • setLogMin

        public Value.Parameters setLogMin​(java.lang.Boolean logMin)
        (De-)Activate logging the minimal value observed for each interval.
        Returns:
        "this" for call chaining
      • setLogInsertions

        public Value.Parameters setLogInsertions​(java.lang.Boolean logInsertions)
        (De-)Activate loging the number of observations for each interval.
        Returns:
        "this" for call chaining
      • setNameExtension

        public Value.Parameters setNameExtension​(java.lang.Boolean nameExtension)
        Whether or not to add an identifying extension (like mean) to event names when logging derived values. It is useful to disable extensions if a only a single dervied value, e.g. the mean, is the only thing to be logged. The default is to use extensions. If extensions are disabled, the ability to log more than one of raw value, min, max, mean (i.e. the raw value and derived values of the same type) is disabled to avoid confusion. Since histograms are not Value events, these never have a name extension and are always available.
        Returns:
        "this" for call chaining
      • setLogHistogram

        public Value.Parameters setLogHistogram​(java.lang.Boolean logHistogram)
        (De-)Activate logging a data histogram.
        Returns:
        "this" for call chaining
      • setLimits

        public Value.Parameters setLimits​(Limits limits)
        The limits to use if logging as a histogram. The Limits instance must be frozen before using the Parameters instance in a Value constructor call.
        Returns:
        "this" for call chaining*
        See Also:
        Limits
      • setAppendChar

        public Value.Parameters setAppendChar​(java.lang.Character appendChar)
        Separator character to use between event name and type of nameExtension is set to true. The default is '.'.
        Returns:
        "this" for call chaining
      • setCallback

        public Value.Parameters setCallback​(Callback callback)
        Set a callback to be invoked each time this Value is written to the log.
        Parameters:
        callback - to be invoked each time the Value is written to the log
        Returns:
        "this" for call chaining