@API(value=Experimental) 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.from(Map)
,
from(String, String)
Constructor and Description |
---|
ReportEntry() |
Modifier and Type | Method and Description |
---|---|
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. |
static ReportEntry |
from(java.lang.String key,
java.lang.String value)
Factory for creating a new
ReportEntry from a key-value pair. |
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() |
public static ReportEntry from(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)
ReportEntry
from a map of key-value pairs.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 blankpublic static ReportEntry from(java.lang.String key, java.lang.String value)
ReportEntry
from a key-value pair.key
- the key under which the value should published; never
null
or blankvalue
- the value to publish; never null
or blankpublic final java.util.Map<java.lang.String,java.lang.String> getKeyValuePairs()
null
public final java.time.LocalDateTime getTimestamp()
ReportEntry
was created.
Can be used, for example, to order entries.
null
public java.lang.String toString()
toString
in class java.lang.Object