Package org.nuxeo.elasticsearch
Class ElasticSearchChecker
- java.lang.Object
-
- org.nuxeo.elasticsearch.ElasticSearchChecker
-
- All Implemented Interfaces:
BackingChecker
public class ElasticSearchChecker extends Object implements BackingChecker
- Since:
- 11.3
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringADDRESS_LIST_OPTprotected static StringCONFIG_NAMEprotected static StringELASTIC_ENABLED_PROPprotected static StringELASTIC_REST_CLIENT_PROP
-
Constructor Summary
Constructors Constructor Description ElasticSearchChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(ConfigurationHolder configHolder)Test if the check has to be done for the given configuration.voidcheck(ConfigurationHolder configHolder)Test the availability of the backing service.protected ESClientgetClient(ElasticSearchClientConfig config)protected org.elasticsearch.cluster.health.ClusterHealthStatusgetHealthStatus(ElasticSearchClientConfig config)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.launcher.config.backingservices.BackingChecker
getDescriptor, getDescriptor, getDescriptor, getDescriptor
-
-
-
-
Field Detail
-
ELASTIC_ENABLED_PROP
protected static final String ELASTIC_ENABLED_PROP
- See Also:
- Constant Field Values
-
ELASTIC_REST_CLIENT_PROP
protected static final String ELASTIC_REST_CLIENT_PROP
- See Also:
- Constant Field Values
-
ADDRESS_LIST_OPT
protected static final String ADDRESS_LIST_OPT
- See Also:
- Constant Field Values
-
CONFIG_NAME
protected static final String CONFIG_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
accepts
public boolean accepts(ConfigurationHolder configHolder)
Description copied from interface:BackingCheckerTest if the check has to be done for the given configuration.- Specified by:
acceptsin interfaceBackingChecker- Parameters:
configHolder- The current configuration- Returns:
- true if
BackingChecker.check(ConfigurationHolder)has to be called.
-
check
public void check(ConfigurationHolder configHolder) throws ConfigurationException
Description copied from interface:BackingCheckerTest the availability of the backing service.- Specified by:
checkin interfaceBackingChecker- Parameters:
configHolder- The current configuration- Throws:
ConfigurationException- if backing service is not available.
-
getHealthStatus
protected org.elasticsearch.cluster.health.ClusterHealthStatus getHealthStatus(ElasticSearchClientConfig config) throws ConfigurationException
- Throws:
ConfigurationException
-
getClient
protected ESClient getClient(ElasticSearchClientConfig config)
-
-