Package org.pentaho.di.core.logging
Class MetricsRegistry
- java.lang.Object
-
- org.pentaho.di.core.logging.MetricsRegistry
-
public class MetricsRegistry extends Object
This singleton will capture all the metrics coming from the various log channels based on the log channel ID.- Author:
- matt
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSnapshot(LogChannelInterface logChannel, MetricsSnapshotInterface snapshot)
static MetricsRegistry
getInstance()
Queue<MetricsSnapshotInterface>
getSnapshotList(String logChannelId)
Get the snapshot list for the given log channel ID.Map<String,Queue<MetricsSnapshotInterface>>
getSnapshotLists()
Map<String,MetricsSnapshotInterface>
getSnapshotMap(String logChannelId)
Get the snapshot map for the given log channel ID.Map<String,Map<String,MetricsSnapshotInterface>>
getSnapshotMaps()
void
reset()
-
-
-
Method Detail
-
getInstance
public static MetricsRegistry getInstance()
-
addSnapshot
public void addSnapshot(LogChannelInterface logChannel, MetricsSnapshotInterface snapshot)
-
getSnapshotLists
public Map<String,Queue<MetricsSnapshotInterface>> getSnapshotLists()
-
getSnapshotMaps
public Map<String,Map<String,MetricsSnapshotInterface>> getSnapshotMaps()
-
getSnapshotList
public Queue<MetricsSnapshotInterface> getSnapshotList(String logChannelId)
Get the snapshot list for the given log channel ID. If no list is available, one is created (and stored).- Parameters:
logChannelId
- The log channel to use.- Returns:
- an existing or a new metrics snapshot list.
-
getSnapshotMap
public Map<String,MetricsSnapshotInterface> getSnapshotMap(String logChannelId)
Get the snapshot map for the given log channel ID. If no map is available, one is created (and stored).- Parameters:
logChannelId
- The log channel to use.- Returns:
- an existing or a new metrics snapshot map.
-
reset
public void reset()
-
-