public class ProbeManagerImpl extends Object implements ProbeManager
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS |
static String |
DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS_PROPERTY |
protected Set<ProbeInfo> |
failed |
protected Map<String,ProbeInfo> |
infosByShortcuts |
protected Map<Class<? extends Probe>,ProbeInfo> |
infosByTypes |
protected static org.apache.commons.logging.Log |
log |
protected Map<String,Probe> |
probesByShortcuts |
protected Map<String,ProbeInfo> |
probesForHealthCheck |
protected Set<ProbeInfo> |
succeed |
Constructor and Description |
---|
ProbeManagerImpl() |
protected static final org.apache.commons.logging.Log log
protected final Map<Class<? extends Probe>,ProbeInfo> infosByTypes
protected final Map<String,ProbeInfo> infosByShortcuts
protected final Map<String,Probe> probesByShortcuts
protected final Map<String,ProbeInfo> probesForHealthCheck
public static final String DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS_PROPERTY
public static final String DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS
public ProbeManagerImpl()
protected Set<String> doExtractProbesName(Collection<ProbeInfo> runners)
public Collection<ProbeInfo> getAllProbeInfos()
getAllProbeInfos
in interface ProbeManager
public Collection<ProbeInfo> getInSuccessProbeInfos()
getInSuccessProbeInfos
in interface ProbeManager
public Collection<ProbeInfo> getInFailureProbeInfos()
getInFailureProbeInfos
in interface ProbeManager
public Collection<String> getProbeNames()
getProbeNames
in interface ProbeRunnerMBean
public int getProbesCount()
getProbesCount
in interface ProbeRunnerMBean
public Collection<String> getProbesInError()
getProbesInError
in interface ProbeRunnerMBean
public int getProbesInErrorCount()
getProbesInErrorCount
in interface ProbeRunnerMBean
public Collection<String> getProbesInSuccess()
getProbesInSuccess
in interface ProbeRunnerMBean
public int getProbesInSuccessCount()
getProbesInSuccessCount
in interface ProbeRunnerMBean
public ProbeInfo getProbeInfo(Class<? extends Probe> probeClass)
getProbeInfo
in interface ProbeManager
public boolean runAllProbes()
runAllProbes
in interface ProbeRunnerMBean
public ProbeInfo runProbe(ProbeInfo probe)
runProbe
in interface ProbeManager
public ProbeInfo runProbe(String name)
runProbe
in interface ProbeManager
public ProbeInfo getProbeInfo(String name)
getProbeInfo
in interface ProbeManager
public void registerProbe(ProbeDescriptor descriptor)
public void unregisterProbe(ProbeDescriptor descriptor)
protected void doRun()
protected static Long doGetDuration(Date fromDate, Date toDate)
protected void doRunProbe(ProbeInfo probe)
public void registerProbeForHealthCheck(HealthCheckProbesDescriptor descriptor)
ProbeManager
registerProbeForHealthCheck
in interface ProbeManager
public Collection<ProbeInfo> getHealthCheckProbes()
ProbeManager
getHealthCheckProbes
in interface ProbeManager
public HealthCheckResult getOrRunHealthChecks()
ProbeManager
getOrRunHealthChecks
in interface ProbeManager
public HealthCheckResult getOrRunHealthCheck(String name) throws IllegalArgumentException
ProbeManager
getOrRunHealthCheck
in interface ProbeManager
IllegalArgumentException
protected void getStatusOrRunProbe(ProbeInfo probe, int refreshSeconds)
Copyright © 2018 Nuxeo. All rights reserved.