Module org.elasticsearch.xcore
Class MonitoringDoc
java.lang.Object
org.elasticsearch.xpack.core.monitoring.exporter.MonitoringDoc
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public abstract class MonitoringDoc
extends Object
implements org.elasticsearch.xcontent.ToXContentObject
Base class for all monitoring documents.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMonitoringDoc.Noderepresents the node of the cluster from which the monitoring document has been collected.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionMonitoringDoc(String cluster, long timestamp, long intervalMillis, MonitoringDoc.Node node, MonitoredSystem system, String type, String id) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()longgetNode()longgetType()inthashCode()protected abstract voidinnerToXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) static StringtoUTC(long timestamp) Converts a timestamp in milliseconds to itsStringrepresentation in UTC time.org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
MonitoringDoc
public MonitoringDoc(String cluster, long timestamp, long intervalMillis, @Nullable MonitoringDoc.Node node, MonitoredSystem system, String type, @Nullable String id)
-
-
Method Details
-
getCluster
-
getTimestamp
public long getTimestamp() -
getIntervalMillis
public long getIntervalMillis() -
getNode
-
getSystem
-
getType
-
getId
-
equals
-
hashCode
public int hashCode() -
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
innerToXContent
protected abstract void innerToXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Throws:
IOException
-
toUTC
Converts a timestamp in milliseconds to itsStringrepresentation in UTC time.- Parameters:
timestamp- the timestamp to convert- Returns:
- a string representing the timestamp
-