com.ibm.streams.operator.metrics
Interface Metric
-
public interface Metric
A metric represents a measurement of an element in either an operator or a processing element. A metric's value is an signed 64-bit integer value, represented as a primitive long in the Java Operator API.- See Also:
OperatorMetrics
,PEMetrics
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static class
Metric.Kind
Kind of metric.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getDescription()
Get the description of this metric.Metric.Kind
getKind()
Get the kind of this metric.java.lang.String
getName()
Get the name of this metric.long
getValue()
Get the value of this metric.void
increment()
Increment the value of this metric by one.void
incrementValue(long delta)
Increment the value of this metric.void
setValue(long value)
Set the value of this metric.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Get the name of this metric.- Returns:
- Name of the metric.
-
getDescription
java.lang.String getDescription()
Get the description of this metric.- Returns:
- Description of the metric.
-
getKind
Metric.Kind getKind()
Get the kind of this metric.- Returns:
- Kind of the metric.
-
getValue
long getValue()
Get the value of this metric.- Returns:
- Value of the metric.
- Throws:
java.lang.IllegalStateException
- Operator has been shutdown.
-
setValue
void setValue(long value)
Set the value of this metric.- Parameters:
value
- Value to set this metric to.- Throws:
java.lang.UnsupportedOperationException
- Metric is read-only.java.lang.IllegalStateException
- Operator has been shutdown.
-
incrementValue
void incrementValue(long delta)
Increment the value of this metric.- Parameters:
delta
- Incremental value to add to the metric's value.- Throws:
java.lang.UnsupportedOperationException
- Metric is read-only.java.lang.IllegalStateException
- Operator has been shutdown.
-
increment
void increment()
Increment the value of this metric by one.- Throws:
java.lang.UnsupportedOperationException
- Metric is read-only.java.lang.IllegalStateException
- Operator has been shutdown.- Since:
- InfoSphere® Streams Version 3.1
-
-