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 String
ADDRESS_LIST_OPT
protected static String
CONFIG_NAME
protected static String
ELASTIC_ENABLED_PROP
protected static String
ELASTIC_REST_CLIENT_PROP
-
Constructor Summary
Constructors Constructor Description ElasticSearchChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(ConfigurationGenerator cg)
Test if the check has to be done for the given configuration.void
check(ConfigurationGenerator cg)
Test the availbilty of the backing service.protected ESClient
getClient(ElasticSearchClientConfig config)
protected ElasticSearchClientConfig
getConfig(ConfigurationGenerator cg)
protected ElasticSearchClientConfig
getDescriptor(File file)
protected org.elasticsearch.cluster.health.ClusterHealthStatus
getHealthStatus(ElasticSearchClientConfig config)
-
-
-
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
-
-
Constructor Detail
-
ElasticSearchChecker
public ElasticSearchChecker()
-
-
Method Detail
-
accepts
public boolean accepts(ConfigurationGenerator cg)
Description copied from interface:BackingChecker
Test if the check has to be done for the given configuration.- Specified by:
accepts
in interfaceBackingChecker
- Parameters:
cg
- The current configuration- Returns:
- true if
BackingChecker.check(ConfigurationGenerator)
has to be called.
-
check
public void check(ConfigurationGenerator cg) throws ConfigurationException
Description copied from interface:BackingChecker
Test the availbilty of the backing service.- Specified by:
check
in interfaceBackingChecker
- Parameters:
cg
- 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)
-
getConfig
protected ElasticSearchClientConfig getConfig(ConfigurationGenerator cg) throws ConfigurationException
- Throws:
ConfigurationException
-
getDescriptor
protected ElasticSearchClientConfig getDescriptor(File file) throws ConfigurationException
- Throws:
ConfigurationException
-
-