Class ReportEntry



  • @API(status=STABLE,
         since="1.0")
    public final class ReportEntry
    extends java.lang.Object
    ReportEntry encapsulates a time-stamped map of String-based key-value pairs to be published to the reporting infrastructure.
    Since:
    1.0
    See Also:
    from(Map), from(String, String)
    • Constructor Summary

      Constructors 
      Constructor Description
      ReportEntry​()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ReportEntry from​(java.lang.String key, java.lang.String value)
      Factory for creating a new ReportEntry from a key-value pair.
      static ReportEntry from​(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)
      Factory for creating a new ReportEntry from a map of key-value pairs.
      java.util.Map<java.lang.String,java.lang.String> getKeyValuePairs​()
      Get an unmodifiable copy of the map of key-value pairs to be published.
      java.time.LocalDateTime getTimestamp​()
      Get the timestamp for when this ReportEntry was created.
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ReportEntry

        public ReportEntry​()
    • Method Detail

      • from

        public static ReportEntry from​(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)
        Factory for creating a new ReportEntry from a map of key-value pairs.
        Parameters:
        keyValuePairs - the map of key-value pairs to be published; never null; keys and values within entries in the map also must not be null or blank
      • from

        public static ReportEntry from​(java.lang.String key,
                                       java.lang.String value)
        Factory for creating a new ReportEntry from a key-value pair.
        Parameters:
        key - the key under which the value should published; never null or blank
        value - the value to publish; never null or blank
      • getKeyValuePairs

        public final java.util.Map<java.lang.String,java.lang.String> getKeyValuePairs​()
        Get an unmodifiable copy of the map of key-value pairs to be published.
        Returns:
        a copy of the map of key-value pairs; never null
      • getTimestamp

        public final java.time.LocalDateTime getTimestamp​()
        Get the timestamp for when this ReportEntry was created.

        Can be used, for example, to order entries.

        Returns:
        when this entry was created; never null
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object