@Service(name="healthcheck-core") @RunLevel(value=10) public class HealthCheckService extends Object implements EventListener, org.jvnet.hk2.config.ConfigListener
EventListener.Event<T>| Constructor and Description |
|---|
HealthCheckService() |
| Modifier and Type | Method and Description |
|---|---|
void |
bootstrapHealthCheck()
Starts the healthcheck service.
|
void |
bootstrapNotifierList()
Starts all notifiers that have been enable with the healthcheck service.
|
org.jvnet.hk2.config.UnprocessedChangeEvents |
changed(PropertyChangeEvent[] events) |
void |
event(EventListener.Event event)
Process a Glassfish/Payara event
|
BaseHealthCheck |
getCheck(String serviceName) |
HealthCheckServiceConfiguration |
getConfiguration()
Gets the current configuration of the healthcheck service
|
Integer |
getHistoricalTraceStoreSize()
Gets the number of healthchecks to be stored.
|
List<NotifierExecutionOptions> |
getNotifierExecutionOptionsList()
Gets a list of all the options of all notifiers configured with the healthcheck service.
|
boolean |
isEnabled() |
boolean |
isHistoricalTraceEnabled()
Returns true if historic healthchecks are stored
|
void |
reboot()
Restartes the healthcheck service and gets the configuration for it
|
void |
registerCheck(String name,
BaseHealthCheck check) |
void |
setConfiguration(HealthCheckServiceConfiguration configuration) |
void |
setEnabled(Boolean enabled)
Sets whether the healthcheck service is enabled.
|
void |
setHistoricalTraceEnabled(boolean historicalTraceEnabled)
Sets whether historic healthchecks are stored
|
void |
setHistoricalTraceStoreSize(Integer historicalTraceStoreSize)
Sets the amount of historic healthchecks to store
|
void |
setHistoricalTraceStoreTimeout(long historicalTraceStoreTimeout)
Sets the length in seconds to keep historic healthchecks, ones older than this will be discarded.
|
void |
shutdownHealthCheck()
Gracefully shuts down the healthcheck service
|
public void event(EventListener.Event event)
EventListenerevent in interface EventListenerpublic void registerCheck(String name, BaseHealthCheck check)
public void bootstrapHealthCheck()
public void bootstrapNotifierList()
public boolean isEnabled()
public void setEnabled(Boolean enabled)
enabled - If this is true, then the healcheck service will be started.
If it is already enabled then healthcheck will be restarted.public void reboot()
public void shutdownHealthCheck()
public BaseHealthCheck getCheck(String serviceName)
public HealthCheckServiceConfiguration getConfiguration()
public void setConfiguration(HealthCheckServiceConfiguration configuration)
public boolean isHistoricalTraceEnabled()
public void setHistoricalTraceEnabled(boolean historicalTraceEnabled)
historicalTraceEnabled - public Integer getHistoricalTraceStoreSize()
isHistoricalTraceEnabled() returns false
as this can be set independentlypublic void setHistoricalTraceStoreSize(Integer historicalTraceStoreSize)
historicalTraceStoreSize - public void setHistoricalTraceStoreTimeout(long historicalTraceStoreTimeout)
historicalTraceStoreTimeout - if this is > 500 then 500 will be used as the limit.NotificationServicepublic List<NotifierExecutionOptions> getNotifierExecutionOptionsList()
public org.jvnet.hk2.config.UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
changed in interface org.jvnet.hk2.config.ConfigListenerCopyright © 2017. All rights reserved.