Package com.hazelcast.jet.core.metrics
Class JobMetrics
java.lang.Object
com.hazelcast.jet.core.metrics.JobMetrics
- All Implemented Interfaces:
DataSerializable,IdentifiedDataSerializable
An immutable collection of job-specific metrics, pairs of metric names
and sets of associated
Measurements.- Since:
- Jet 3.2
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsTag(String tagName) Returns true if there is anyMeasurementthat has the specified tag.static JobMetricsempty()Returns an emptyJobMetricsobject.booleanConvenience method forfilter(Predicate), returns a newJobMetricsinstance containing only thoseMeasurements which have the specified tag set to the specified value.filter(Predicate<Measurement> predicate) Returns a newJobMetricsinstance containing a subset of theMeasurements found in the current one.Returns allMeasurements associated with a given metric name.intReturns type identifier for this class.intReturns DataSerializableFactory factory ID for this class.inthashCode()metrics()Returns all metrics present.static JobMetricsof(Map<String, List<Measurement>> metrics) Builds aJobMetricsobject based on a map ofMeasurements.voidReads fields from the input streamtoString()voidWrites object fields to output stream
-
Method Details
-
empty
Returns an emptyJobMetricsobject. -
of
Builds aJobMetricsobject based on a map ofMeasurements. -
metrics
Returns all metrics present. -
get
Returns allMeasurements associated with a given metric name.For a list of job-specific metric names please see
MetricNames. -
filter
Convenience method forfilter(Predicate), returns a newJobMetricsinstance containing only thoseMeasurements which have the specified tag set to the specified value.For a list of available tag names, see
MetricTags. -
containsTag
Returns true if there is anyMeasurementthat has the specified tag.- Since:
- 5.4
-
filter
Returns a newJobMetricsinstance containing a subset of theMeasurements found in the current one. The subset is formed by thoseMeasurements which match the providedPredicate.The metric names which have all their
Measurements filtered out won't be present in the newJobMetricsinstance. -
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryIdin interfaceIdentifiedDataSerializable- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassIdin interfaceIdentifiedDataSerializable- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializableWrites object fields to output stream- Specified by:
writeDatain interfaceDataSerializable- Parameters:
out- output- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializableReads fields from the input stream- Specified by:
readDatain interfaceDataSerializable- Parameters:
in- input- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the input stream has been closed.
-
hashCode
public int hashCode() -
equals
-
toString
-