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
Measurement
s.- Since:
- Jet 3.2
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsTag
(String tagName) Returns true if there is anyMeasurement
that has the specified tag.static JobMetrics
empty()
Returns an emptyJobMetrics
object.boolean
Convenience method forfilter(Predicate)
, returns a newJobMetrics
instance containing only thoseMeasurement
s which have the specified tag set to the specified value.filter
(Predicate<Measurement> predicate) Returns a newJobMetrics
instance containing a subset of theMeasurement
s found in the current one.Returns allMeasurement
s associated with a given metric name.int
Returns type identifier for this class.int
Returns DataSerializableFactory factory ID for this class.int
hashCode()
metrics()
Returns all metrics present.static JobMetrics
of
(Map<String, List<Measurement>> metrics) Builds aJobMetrics
object based on a map ofMeasurement
s.void
Reads fields from the input streamtoString()
void
Writes object fields to output stream
-
Method Details
-
empty
Returns an emptyJobMetrics
object. -
of
Builds aJobMetrics
object based on a map ofMeasurement
s. -
metrics
Returns all metrics present. -
get
Returns allMeasurement
s associated with a given metric name.For a list of job-specific metric names please see
MetricNames
. -
filter
Convenience method forfilter(Predicate)
, returns a newJobMetrics
instance containing only thoseMeasurement
s 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 anyMeasurement
that has the specified tag.- Since:
- 5.4
-
filter
Returns a newJobMetrics
instance containing a subset of theMeasurement
s found in the current one. The subset is formed by thoseMeasurement
s which match the providedPredicate
.The metric names which have all their
Measurement
s filtered out won't be present in the newJobMetrics
instance. -
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
hashCode
public int hashCode() -
equals
-
toString
-