Package org.pentaho.di.core.metrics
Class MetricsSnapshot
java.lang.Object
org.pentaho.di.core.metrics.MetricsSnapshot
- All Implemented Interfaces:
MetricsSnapshotInterface
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsSnapshot(MetricsSnapshotType type, MetricsInterface metric, long value, String logChannelId) Create a snapshot metric with a value.MetricsSnapshot(MetricsSnapshotType type, MetricsInterface metric, String logChannelId) Create a new metrics snapshot without a subjectMetricsSnapshot(MetricsSnapshotType type, MetricsInterface metric, String subject, long value, String logChannelId) Create a snapshot metric with a value.MetricsSnapshot(MetricsSnapshotType type, MetricsInterface metric, String subject, String logChannelId) Create a new metrics snapshot -
Method Summary
Modifier and TypeMethodDescriptiongetDate()getKey()Calculate the key for this snapshot, usually a combination of description and subject.static StringgetKey(MetricsInterface metric, String subject) getType()getValue()voidvoidsetLogChannelId(String logChannelId) voidsetMetric(MetricsInterface metric) voidsetSubject(String subject) voidsetType(MetricsSnapshotType type) voidtoString()
-
Constructor Details
-
MetricsSnapshot
public MetricsSnapshot(MetricsSnapshotType type, MetricsInterface metric, String subject, String logChannelId) Create a new metrics snapshot- Parameters:
type-metric- the metric to use (ex. Connect to database)subject- the name of the metric subject (ex. the name of the database we're connecting to)logChannelId-
-
MetricsSnapshot
Create a new metrics snapshot without a subject- Parameters:
type-description-logChannelId-
-
MetricsSnapshot
public MetricsSnapshot(MetricsSnapshotType type, MetricsInterface metric, String subject, long value, String logChannelId) Create a snapshot metric with a value.- Parameters:
type- The type. For metrics with a value it is usually MIN, MAX, SUM, COUNT, ...metric- The metric to usesubject- The subjectvalue- The valuelogChannelId- The logging channel to reference.
-
MetricsSnapshot
public MetricsSnapshot(MetricsSnapshotType type, MetricsInterface metric, long value, String logChannelId) Create a snapshot metric with a value.- Parameters:
type- The type. For metrics with a value it is usually MIN, MAX, SUM, COUNT, ...description- The descriptionvalue- The valuelogChannelId- The logging channel to reference.
-
-
Method Details
-
getKey
Description copied from interface:MetricsSnapshotInterfaceCalculate the key for this snapshot, usually a combination of description and subject.- Specified by:
getKeyin interfaceMetricsSnapshotInterface- Returns:
- the key for this snapshot
-
getKey
-
toString
-
getDate
- Specified by:
getDatein interfaceMetricsSnapshotInterface- Returns:
- the date
-
setDate
- Specified by:
setDatein interfaceMetricsSnapshotInterface- Parameters:
date- the date to set
-
getType
- Returns:
- the type
-
setType
- Parameters:
type- the type to set
-
getSubject
- Specified by:
getSubjectin interfaceMetricsSnapshotInterface- Returns:
- the subject
-
setSubject
- Parameters:
subject- the subject to set
-
getValue
- Specified by:
getValuein interfaceMetricsSnapshotInterface- Returns:
- the value
-
setValue
- Specified by:
setValuein interfaceMetricsSnapshotInterface- Parameters:
value- the value to set
-
getLogChannelId
- Specified by:
getLogChannelIdin interfaceMetricsSnapshotInterface- Returns:
- the logChannelId
-
setLogChannelId
- Parameters:
logChannelId- the logChannelId to set
-
getMetric
- Specified by:
getMetricin interfaceMetricsSnapshotInterface- Returns:
- the metric
-
setMetric
- Parameters:
metric- the metric to set
-