Interface EpilogueBackend

All Known Implementing Classes:
FileBackend, LazyBackend, MultiBackend, NestedBackend, NTEpilogueBackend, NullBackend

public interface EpilogueBackend
A backend is a generic interface for Epilogue to log discrete data points.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets a backend that can be used to log nested data underneath a specific path.
    Creates a lazy version of this backend.
    void
    log(String identifier, boolean value)
    Logs a boolean data point.
    void
    log(String identifier, boolean[] value)
    Logs a boolean array data point.
    void
    log(String identifier, byte[] value)
    Logs a raw byte array data point.
    void
    log(String identifier, double value)
    Logs a 64-bit floating point data point.
    void
    log(String identifier, double[] value)
    Logs a 64-bit floating point array data point.
    void
    log(String identifier, float value)
    Logs a 32-bit floating point data point.
    void
    log(String identifier, float[] value)
    Logs a 32-bit floating point array data point.
    void
    log(String identifier, int value)
    Logs a 32-bit integer data point.
    void
    log(String identifier, int[] value)
    Logs a 32-bit integer array data point.
    void
    log(String identifier, long value)
    Logs a 64-bit integer data point.
    void
    log(String identifier, long[] value)
    Logs a 64-bit integer array data point.
    default void
    log(String identifier, Measure<?> value)
    Logs a measurement's value in terms of its base unit.
    default <U extends Unit>
    void
    log(String identifier, Measure<U> value, U unit)
    Logs a measurement's value in terms of another unit.
    default void
    log(String identifier, Enum<?> value)
    Logs an enum value.
    void
    log(String identifier, String value)
    Logs a text data point.
    void
    log(String identifier, String[] value)
    Logs a string array data point.
    default void
    log(String identifier, Collection<String> value)
    Logs a collection of strings data point.
    default <S> void
    log(String identifier, Collection<S> value, Struct<S> struct)
    Logs a collection of struct-serializable objects.
    <S> void
    log(String identifier, S[] value, Struct<S> struct)
    Logs an array of struct-serializable objects.
    <S> void
    log(String identifier, S value, Struct<S> struct)
    Logs a struct-serializable object.
    multi(EpilogueBackend... backends)
    Creates a backend that logs to multiple backends at once.
  • Method Details

    • multi

      static EpilogueBackend multi(EpilogueBackend... backends)
      Creates a backend that logs to multiple backends at once. Data reads will still only occur once; data is passed to all composed backends at once.
      Parameters:
      backends - the backends to compose together
      Returns:
      the multi backend
    • lazy

      default EpilogueBackend lazy()
      Creates a lazy version of this backend. A lazy backend will only log data to a field when its value changes, which can help keep file size and bandwidth usage in check. However, there is an additional CPU and memory overhead associated with tracking the current value of every logged entry. The most surefire way to reduce CPU and memory usage associated with logging is to log fewer things - which can be done by opting out of logging unnecessary data or increasing the minimum logged importance level in the Epilogue configuration.
      Returns:
      the lazy backend
    • getNested

      Gets a backend that can be used to log nested data underneath a specific path.
      Parameters:
      path - the path to use for logging nested data under
      Returns:
      the nested backend
    • log

      void log(String identifier, int value)
      Logs a 32-bit integer data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, long value)
      Logs a 64-bit integer data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, float value)
      Logs a 32-bit floating point data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, double value)
      Logs a 64-bit floating point data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, boolean value)
      Logs a boolean data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, byte[] value)
      Logs a raw byte array data point. NOTE: serializable data should be logged using log(String, Object, Struct).
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, int[] value)
      Logs a 32-bit integer array data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, long[] value)
      Logs a 64-bit integer array data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, float[] value)
      Logs a 32-bit floating point array data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, double[] value)
      Logs a 64-bit floating point array data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, boolean[] value)
      Logs a boolean array data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, String value)
      Logs a text data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      void log(String identifier, String[] value)
      Logs a string array data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      default void log(String identifier, Collection<String> value)
      Logs a collection of strings data point.
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      <S> void log(String identifier, S value, Struct<S> struct)
      Logs a struct-serializable object.
      Type Parameters:
      S - the serializable type
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
      struct - the struct to use to serialize the data
    • log

      <S> void log(String identifier, S[] value, Struct<S> struct)
      Logs an array of struct-serializable objects.
      Type Parameters:
      S - the serializable type
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
      struct - the struct to use to serialize the objects
    • log

      default <S> void log(String identifier, Collection<S> value, Struct<S> struct)
      Logs a collection of struct-serializable objects.
      Type Parameters:
      S - the serializable type
      Parameters:
      identifier - the identifier of the data
      value - the collection of objects to log
      struct - the struct to use to serialize the objects
    • log

      default void log(String identifier, Measure<?> value)
      Logs a measurement's value in terms of its base unit.
      Parameters:
      identifier - the identifier of the data field
      value - the new value of the data field
    • log

      default <U extends Unit> void log(String identifier, Measure<U> value, U unit)
      Logs a measurement's value in terms of another unit.
      Type Parameters:
      U - the dimension of the unit
      Parameters:
      identifier - the identifier of the data field
      value - the new value of the data field
      unit - the unit to log the measurement in
    • log

      default void log(String identifier, Enum<?> value)
      Logs an enum value. The value will appear as a string entry using the name of the enum.
      Parameters:
      identifier - the identifier of the data field
      value - the new value of the data field