Package org.pentaho.di.core.metrics
Class MetricsSnapshot
java.lang.Object
org.pentaho.di.core.metrics.MetricsSnapshot
- All Implemented Interfaces:
MetricsSnapshotInterface
-
Constructor Summary
ConstructorDescriptionMetricsSnapshot
(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 String
getKey
(MetricsInterface metric, String subject) getType()
getValue()
void
void
setLogChannelId
(String logChannelId) void
setMetric
(MetricsInterface metric) void
setSubject
(String subject) void
setType
(MetricsSnapshotType type) void
toString()
-
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:MetricsSnapshotInterface
Calculate the key for this snapshot, usually a combination of description and subject.- Specified by:
getKey
in interfaceMetricsSnapshotInterface
- Returns:
- the key for this snapshot
-
getKey
-
toString
-
getDate
- Specified by:
getDate
in interfaceMetricsSnapshotInterface
- Returns:
- the date
-
setDate
- Specified by:
setDate
in interfaceMetricsSnapshotInterface
- Parameters:
date
- the date to set
-
getType
- Returns:
- the type
-
setType
- Parameters:
type
- the type to set
-
getSubject
- Specified by:
getSubject
in interfaceMetricsSnapshotInterface
- Returns:
- the subject
-
setSubject
- Parameters:
subject
- the subject to set
-
getValue
- Specified by:
getValue
in interfaceMetricsSnapshotInterface
- Returns:
- the value
-
setValue
- Specified by:
setValue
in interfaceMetricsSnapshotInterface
- Parameters:
value
- the value to set
-
getLogChannelId
- Specified by:
getLogChannelId
in interfaceMetricsSnapshotInterface
- Returns:
- the logChannelId
-
setLogChannelId
- Parameters:
logChannelId
- the logChannelId to set
-
getMetric
- Specified by:
getMetric
in interfaceMetricsSnapshotInterface
- Returns:
- the metric
-
setMetric
- Parameters:
metric
- the metric to set
-