Class TimeTrackingMonitor
- java.lang.Object
-
- org.opennms.netmgt.provision.service.TimeTrackingMonitor
-
- All Implemented Interfaces:
ProvisionMonitor
public class TimeTrackingMonitor extends Object implements ProvisionMonitor
TimeTrackingMonitor class. It will append all data into MetricRegistry.
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description TimeTrackingMonitor(String name, com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginAuditNodes()
beginAuditNodesvoid
beginImporting()
beginImportingvoid
beginLoadingResource(org.springframework.core.io.Resource resource)
beginLoadingResourcevoid
beginPersisting(ImportOperation oper)
beginPersistingvoid
beginRelateNodes()
beginRelateNodesvoid
beginScanEvent(ImportOperation oper)
beginPreprocessingvoid
beginScanning(NodeScan nodeScan)
beginPreprocessingvoid
beginScheduling()
beginSchedulingvoid
beginSendingEvent(Event event)
beginSendingEventsvoid
finish()
capture finish time of the monitorvoid
finishAuditNodes()
finishAuditNodesvoid
finishImporting()
finishImportingvoid
finishLoadingResource(org.springframework.core.io.Resource resource, int nodeCount)
finishLoadingResourcevoid
finishPersisting(ImportOperation oper)
finishPersistingvoid
finishRelateNodes()
finishRelateNodesvoid
finishScanEvent(ImportOperation oper)
finishPreprocessingvoid
finishScanning(NodeScan nodeScan)
finishPreprocessingvoid
finishScheduling()
finishSchedulingvoid
finishSendingEvent(Event event)
finishSendingEventscom.codahale.metrics.Timer
getAuditTimer()
Map<NodeScan,Date>
getCurrentNodes()
Date
getEndTime()
com.codahale.metrics.Timer
getEventTimer()
com.codahale.metrics.Timer
getImportTimer()
com.codahale.metrics.Timer
getLoadingTimer()
String
getName()
int
getNodeCount()
com.codahale.metrics.Timer
getPersistingTimer()
com.codahale.metrics.Timer
getRelateTimer()
com.codahale.metrics.Timer
getScanEventTimer()
com.codahale.metrics.Timer
getScanningTimer()
com.codahale.metrics.Timer
getSchedulingTimer()
Date
getStartTime()
void
start()
capture start time of the monitorString
toString()
toString
-
-
-
Constructor Detail
-
TimeTrackingMonitor
public TimeTrackingMonitor(String name, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
getStartTime
public Date getStartTime()
-
getEndTime
public Date getEndTime()
-
getName
public String getName()
- Specified by:
getName
in interfaceProvisionMonitor
- Returns:
- name of the monitor (also act as key in MonitorHolder)
-
start
public void start()
Description copied from interface:ProvisionMonitor
capture start time of the monitor- Specified by:
start
in interfaceProvisionMonitor
-
finish
public void finish()
Description copied from interface:ProvisionMonitor
capture finish time of the monitor- Specified by:
finish
in interfaceProvisionMonitor
-
getLoadingTimer
public com.codahale.metrics.Timer getLoadingTimer()
-
getAuditTimer
public com.codahale.metrics.Timer getAuditTimer()
-
getImportTimer
public com.codahale.metrics.Timer getImportTimer()
-
getSchedulingTimer
public com.codahale.metrics.Timer getSchedulingTimer()
-
getRelateTimer
public com.codahale.metrics.Timer getRelateTimer()
-
getScanEventTimer
public com.codahale.metrics.Timer getScanEventTimer()
-
getScanningTimer
public com.codahale.metrics.Timer getScanningTimer()
-
getPersistingTimer
public com.codahale.metrics.Timer getPersistingTimer()
-
getEventTimer
public com.codahale.metrics.Timer getEventTimer()
-
getNodeCount
public int getNodeCount()
- Specified by:
getNodeCount
in interfaceProvisionMonitor
- Returns:
- total number of nodes in resources
-
beginScheduling
public void beginScheduling()
beginScheduling
- Specified by:
beginScheduling
in interfaceProvisionMonitor
-
finishScheduling
public void finishScheduling()
finishScheduling
- Specified by:
finishScheduling
in interfaceProvisionMonitor
-
beginScanEvent
public void beginScanEvent(ImportOperation oper)
beginPreprocessing
- Specified by:
beginScanEvent
in interfaceProvisionMonitor
- Parameters:
oper
- aImportOperation
object.
-
finishScanEvent
public void finishScanEvent(ImportOperation oper)
finishPreprocessing
- Specified by:
finishScanEvent
in interfaceProvisionMonitor
- Parameters:
oper
- aImportOperation
object.
-
beginScanning
public void beginScanning(NodeScan nodeScan)
Description copied from interface:ProvisionMonitor
beginPreprocessing
- Specified by:
beginScanning
in interfaceProvisionMonitor
- Parameters:
nodeScan
- aNodeScan
object.
-
finishScanning
public void finishScanning(NodeScan nodeScan)
Description copied from interface:ProvisionMonitor
finishPreprocessing
- Specified by:
finishScanning
in interfaceProvisionMonitor
- Parameters:
nodeScan
- aNodeScan
object.
-
beginPersisting
public void beginPersisting(ImportOperation oper)
beginPersisting
- Specified by:
beginPersisting
in interfaceProvisionMonitor
- Parameters:
oper
- aImportOperation
object.
-
finishPersisting
public void finishPersisting(ImportOperation oper)
finishPersisting
- Specified by:
finishPersisting
in interfaceProvisionMonitor
- Parameters:
oper
- aImportOperation
object.
-
beginSendingEvent
public void beginSendingEvent(Event event)
beginSendingEvents
- Specified by:
beginSendingEvent
in interfaceProvisionMonitor
- Parameters:
event
- aEvent
object.
-
finishSendingEvent
public void finishSendingEvent(Event event)
finishSendingEvents
- Specified by:
finishSendingEvent
in interfaceProvisionMonitor
- Parameters:
event
- aEvent
object.
-
beginLoadingResource
public void beginLoadingResource(org.springframework.core.io.Resource resource)
beginLoadingResource
- Specified by:
beginLoadingResource
in interfaceProvisionMonitor
- Parameters:
resource
- aResource
object.
-
finishLoadingResource
public void finishLoadingResource(org.springframework.core.io.Resource resource, int nodeCount)
Description copied from interface:ProvisionMonitor
finishLoadingResource
- Specified by:
finishLoadingResource
in interfaceProvisionMonitor
- Parameters:
resource
- aResource
object.
-
beginImporting
public void beginImporting()
beginImporting
- Specified by:
beginImporting
in interfaceProvisionMonitor
-
finishImporting
public void finishImporting()
finishImporting
- Specified by:
finishImporting
in interfaceProvisionMonitor
-
beginAuditNodes
public void beginAuditNodes()
beginAuditNodes
- Specified by:
beginAuditNodes
in interfaceProvisionMonitor
-
finishAuditNodes
public void finishAuditNodes()
finishAuditNodes
- Specified by:
finishAuditNodes
in interfaceProvisionMonitor
-
beginRelateNodes
public void beginRelateNodes()
beginRelateNodes
- Specified by:
beginRelateNodes
in interfaceProvisionMonitor
-
finishRelateNodes
public void finishRelateNodes()
finishRelateNodes
- Specified by:
finishRelateNodes
in interfaceProvisionMonitor
-
-