Class MonitorHolder
- java.lang.Object
-
- org.opennms.netmgt.provision.service.MonitorHolder
-
public class MonitorHolder extends Object
It is the holder class for all provisiond performance monitors. It also creates a JmxReporter.
-
-
Constructor Summary
Constructors Constructor Description MonitorHolder()
For spring use.MonitorHolder(long seconds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createCacheWithExpireTime(long seconds)
It will create a new local cache with specific access expire hours.TimeTrackingMonitor
createMonitor(String name)
It will return existing monitor or create new oneTimeTrackingMonitor
createMonitor(String name, ImportJob job)
It will return existing monitor or create new oneProvisionMonitor
getMonitor(String key)
It will only return existing monitorMap<String,TimeTrackingMonitor>
getMonitors()
void
shutdown()
-
-
-
Method Detail
-
createCacheWithExpireTime
public void createCacheWithExpireTime(long seconds)
It will create a new local cache with specific access expire hours. If existing cache is not empty, it will also copy exising data to new cache.- Parameters:
seconds
-
-
createMonitor
public TimeTrackingMonitor createMonitor(String name, ImportJob job) throws ExecutionException
It will return existing monitor or create new one- Parameters:
name
- (For key. It will append with start time)job
-- Returns:
- TimeTrackingMonitor
- Throws:
ExecutionException
-
createMonitor
public TimeTrackingMonitor createMonitor(String name) throws ExecutionException
It will return existing monitor or create new one- Parameters:
name
- (For key. It will append with start time)- Returns:
- TimeTrackingMonitor
- Throws:
ExecutionException
-
getMonitor
public ProvisionMonitor getMonitor(String key)
It will only return existing monitor- Parameters:
key
-- Returns:
- monitor (nullable)
- Throws:
ExecutionException
-
getMonitors
public Map<String,TimeTrackingMonitor> getMonitors()
-
shutdown
public void shutdown()
-
-