Package dk.netarkivet.heritrix3.monitor
Class Heritrix3JobMonitorThread
- java.lang.Object
-
- dk.netarkivet.heritrix3.monitor.Heritrix3JobMonitorThread
-
- All Implemented Interfaces:
java.lang.Runnable
public class Heritrix3JobMonitorThread extends java.lang.Object implements java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description boolean
bExit
Boolean switch to close the thread.java.util.Map<java.lang.Long,Heritrix3JobMonitor>
filterJobMonitorMap
java.util.List<java.lang.String>
h3HostnamePortDisabledList
List of hosts with monitoring disabled.java.util.List<java.lang.String>
h3HostnamePortEnabledList
List of hosts with monitoring enabled.java.util.Set<java.lang.String>
h3HostPortSet
static HarvestChannelDAO
harvestChannelDAO
HarvestChannelDAO
instance.static JobDAO
jobDAO
JobDAO
instance.java.util.Map<java.lang.Long,Heritrix3JobMonitor>
runningJobMonitorMap
A map from harvest job number to the running H3 job monitor for the given jobstatic RunningJobsInfoDAO
runningJobsInfoDAO
RunningJobsInfoDAO
instance.java.lang.Thread
thread
Current thread.java.lang.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)
java.util.List<Heritrix3JobMonitor>
getRunningH3Jobs()
java.util.Set<java.lang.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
-
runningJobsInfoDAO
public static RunningJobsInfoDAO runningJobsInfoDAO
RunningJobsInfoDAO
instance.
-
harvestChannelDAO
public static HarvestChannelDAO harvestChannelDAO
HarvestChannelDAO
instance.
-
thread
public java.lang.Thread thread
Current thread.
-
throwable
public java.lang.Throwable throwable
If caught, the throwable that stopped the monitor thread.
-
bExit
public boolean bExit
Boolean switch to close the thread.
-
runningJobMonitorMap
public java.util.Map<java.lang.Long,Heritrix3JobMonitor> runningJobMonitorMap
A map from harvest job number to the running H3 job monitor for the given job
-
filterJobMonitorMap
public java.util.Map<java.lang.Long,Heritrix3JobMonitor> filterJobMonitorMap
-
h3HostPortSet
public final java.util.Set<java.lang.String> h3HostPortSet
-
h3HostnamePortEnabledList
public final java.util.List<java.lang.String> h3HostnamePortEnabledList
List of hosts with monitoring enabled.
-
h3HostnamePortDisabledList
public final java.util.List<java.lang.String> h3HostnamePortDisabledList
List of hosts with monitoring disabled.
-
-
Constructor Detail
-
Heritrix3JobMonitorThread
public Heritrix3JobMonitorThread(NASEnvironment environment)
-
-
Method Detail
-
init
public void init() throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public void start()
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
getRunningJobs
public java.util.Set<java.lang.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 java.util.List<Heritrix3JobMonitor> getRunningH3Jobs()
-
checkH3HostnamePort
public void checkH3HostnamePort(Heritrix3JobMonitor jobmonitor)
-
isH3HostnamePortEnabled
public boolean isH3HostnamePortEnabled(Heritrix3JobMonitor jobmonitor)
-
updateH3HostnamePortFilter
public void updateH3HostnamePortFilter()
-
-