Package dk.netarkivet.heritrix3.monitor
Class Heritrix3JobMonitorThread
- java.lang.Object
-
- dk.netarkivet.heritrix3.monitor.Heritrix3JobMonitorThread
-
-
Field Summary
Fields Modifier and Type Field Description boolean
bExit
Boolean switch to close the thread.Map<Long,Heritrix3JobMonitor>
filterJobMonitorMap
List<String>
h3HostnamePortDisabledList
List of hosts with monitoring disabled.List<String>
h3HostnamePortEnabledList
List of hosts with monitoring enabled.Set<String>
h3HostPortSet
static HarvestChannelDAO
harvestChannelDAO
HarvestChannelDAO
instance.static JobDAO
jobDAO
JobDAO
instance.Map<Long,Heritrix3JobMonitor>
runningJobMonitorMap
A map from harvest job number to the running H3 job monitor for the given jobstatic RunningJobsInfoDAO
runningJobsInfoDAO
RunningJobsInfoDAO
instance.Thread
thread
Current thread.Throwable
throwable
If caught, the throwable that stopped the monitor thread.
-
Constructor Summary
Constructors Constructor Description Heritrix3JobMonitorThread(NASEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkH3HostnamePort(Heritrix3JobMonitor jobmonitor)
Heritrix3JobMonitor
getRunningH3Job(long jobId)
List<Heritrix3JobMonitor>
getRunningH3Jobs()
Set<Long>
getRunningJobs()
Encapsulate call to get the set of running jobs and make a copy of it inside a throwable since concurrency is an issues.void
init()
boolean
isH3HostnamePortEnabled(Heritrix3JobMonitor jobmonitor)
void
run()
void
start()
void
updateH3HostnamePortFilter()
-
-
-
Field Detail
-
jobDAO
public static JobDAO jobDAO
JobDAO
instance.
-
runningJobsInfoDAO
public static RunningJobsInfoDAO runningJobsInfoDAO
RunningJobsInfoDAO
instance.
-
harvestChannelDAO
public static HarvestChannelDAO harvestChannelDAO
HarvestChannelDAO
instance.
-
thread
public Thread thread
Current thread.
-
throwable
public Throwable throwable
If caught, the throwable that stopped the monitor thread.
-
bExit
public boolean bExit
Boolean switch to close the thread.
-
runningJobMonitorMap
public Map<Long,Heritrix3JobMonitor> runningJobMonitorMap
A map from harvest job number to the running H3 job monitor for the given job
-
filterJobMonitorMap
public Map<Long,Heritrix3JobMonitor> filterJobMonitorMap
-
h3HostnamePortEnabledList
public final List<String> h3HostnamePortEnabledList
List of hosts with monitoring enabled.
-
-
Constructor Detail
-
Heritrix3JobMonitorThread
public Heritrix3JobMonitorThread(NASEnvironment environment)
-
-
Method Detail
-
start
public void start()
-
getRunningJobs
public Set<Long> getRunningJobs()
Encapsulate call to get the set of running jobs and make a copy of it inside a throwable since concurrency is an issues.- Returns:
- a copy of the running jobs set
-
getRunningH3Job
public Heritrix3JobMonitor getRunningH3Job(long jobId)
-
getRunningH3Jobs
public List<Heritrix3JobMonitor> getRunningH3Jobs()
-
checkH3HostnamePort
public void checkH3HostnamePort(Heritrix3JobMonitor jobmonitor)
-
isH3HostnamePortEnabled
public boolean isH3HostnamePortEnabled(Heritrix3JobMonitor jobmonitor)
-
updateH3HostnamePortFilter
public void updateH3HostnamePortFilter()
-
-