Class ProbeManagerImpl
- java.lang.Object
-
- org.nuxeo.ecm.core.management.probes.ProbeManagerImpl
-
- All Implemented Interfaces:
ProbeManager
,ProbeRunnerMBean
public class ProbeManagerImpl extends Object implements ProbeManager
- Since:
- 5.4
-
-
Field Summary
Fields Modifier and Type Field 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.logging.log4j.Logger
log
protected Map<String,Probe>
probesByShortcuts
protected Map<String,ProbeInfo>
probesForHealthCheck
protected Set<ProbeInfo>
succeed
-
Constructor Summary
Constructors Constructor Description ProbeManagerImpl()
-
Method Summary
-
-
-
Field Detail
-
log
protected static final org.apache.logging.log4j.Logger log
-
DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS_PROPERTY
public static final String DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS
public static final String DEFAULT_HEALTH_CHECK_INTERVAL_SECONDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
doExtractProbesName
protected Set<String> doExtractProbesName(Collection<ProbeInfo> runners)
-
getAllProbeInfos
public Collection<ProbeInfo> getAllProbeInfos()
- Specified by:
getAllProbeInfos
in interfaceProbeManager
-
getInSuccessProbeInfos
public Collection<ProbeInfo> getInSuccessProbeInfos()
- Specified by:
getInSuccessProbeInfos
in interfaceProbeManager
-
getInFailureProbeInfos
public Collection<ProbeInfo> getInFailureProbeInfos()
- Specified by:
getInFailureProbeInfos
in interfaceProbeManager
-
getProbeNames
public Collection<String> getProbeNames()
- Specified by:
getProbeNames
in interfaceProbeRunnerMBean
-
getProbesCount
public int getProbesCount()
- Specified by:
getProbesCount
in interfaceProbeRunnerMBean
-
getProbesInError
public Collection<String> getProbesInError()
- Specified by:
getProbesInError
in interfaceProbeRunnerMBean
-
getProbesInErrorCount
public int getProbesInErrorCount()
- Specified by:
getProbesInErrorCount
in interfaceProbeRunnerMBean
-
getProbesInSuccess
public Collection<String> getProbesInSuccess()
- Specified by:
getProbesInSuccess
in interfaceProbeRunnerMBean
-
getProbesInSuccessCount
public int getProbesInSuccessCount()
- Specified by:
getProbesInSuccessCount
in interfaceProbeRunnerMBean
-
getProbeInfo
public ProbeInfo getProbeInfo(Class<? extends Probe> probeClass)
- Specified by:
getProbeInfo
in interfaceProbeManager
-
runAllProbes
public boolean runAllProbes()
- Specified by:
runAllProbes
in interfaceProbeRunnerMBean
-
runProbe
public ProbeInfo runProbe(ProbeInfo probe)
- Specified by:
runProbe
in interfaceProbeManager
-
runProbe
public ProbeInfo runProbe(String name)
- Specified by:
runProbe
in interfaceProbeManager
-
getProbeInfo
public ProbeInfo getProbeInfo(String name)
- Specified by:
getProbeInfo
in interfaceProbeManager
-
registerProbe
public void registerProbe(ProbeDescriptor descriptor)
-
unregisterProbe
public void unregisterProbe(ProbeDescriptor descriptor)
-
doRun
protected void doRun()
-
doRunProbe
protected void doRunProbe(ProbeInfo probe)
-
registerProbeForHealthCheck
public void registerProbeForHealthCheck(HealthCheckProbesDescriptor descriptor)
Description copied from interface:ProbeManager
This probe is taken into account for the healthCheck- Specified by:
registerProbeForHealthCheck
in interfaceProbeManager
-
getHealthCheckProbes
public Collection<ProbeInfo> getHealthCheckProbes()
Description copied from interface:ProbeManager
List of probes evaluated for a health check- Specified by:
getHealthCheckProbes
in interfaceProbeManager
-
getOrRunHealthChecks
public HealthCheckResult getOrRunHealthChecks()
Description copied from interface:ProbeManager
Return the status of all the probes evaluated for a healthCheck. The probes are run if the last run was more than a short while ago- Specified by:
getOrRunHealthChecks
in interfaceProbeManager
-
getOrRunHealthCheck
public HealthCheckResult getOrRunHealthCheck(String name) throws IllegalArgumentException
Description copied from interface:ProbeManager
Return the status of the given probe. The probe is run only if the last run was more than a short while ago- Specified by:
getOrRunHealthCheck
in interfaceProbeManager
- Throws:
IllegalArgumentException
-
getStatusOrRunProbe
protected void getStatusOrRunProbe(ProbeInfo probe, int refreshSeconds)
-
-