Package org.n52.iceland.statistics.impl
Class ElasticsearchDataHandler
- java.lang.Object
-
- org.n52.iceland.statistics.impl.ElasticsearchDataHandler
-
- All Implemented Interfaces:
IStatisticsDataHandler
public class ElasticsearchDataHandler extends Object implements IStatisticsDataHandler
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchDataHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.elasticsearch.client.RestHighLevelClientgetClient()Returns the underlying elasticsearch clientbooleanisLoggingEnabled()Returns true if the statistics module is enabled otherwise falseorg.elasticsearch.action.index.IndexResponsepersist(Map<String,Object> dataMap)Persist the date to the database
-
-
-
Method Detail
-
persist
public org.elasticsearch.action.index.IndexResponse persist(Map<String,Object> dataMap) throws org.elasticsearch.ElasticsearchGenerationException, IOException
Description copied from interface:IStatisticsDataHandlerPersist the date to the database- Specified by:
persistin interfaceIStatisticsDataHandler- Parameters:
dataMap- keys are property names and the values are the objects- Returns:
- the response
- Throws:
org.elasticsearch.ElasticsearchGenerationException- If an error occursIOException- If an error occurs
-
isLoggingEnabled
public boolean isLoggingEnabled()
Description copied from interface:IStatisticsDataHandlerReturns true if the statistics module is enabled otherwise false- Specified by:
isLoggingEnabledin interfaceIStatisticsDataHandler- Returns:
- is the logging enabled
-
getClient
public org.elasticsearch.client.RestHighLevelClient getClient()
Description copied from interface:IStatisticsDataHandlerReturns the underlying elasticsearch client- Specified by:
getClientin interfaceIStatisticsDataHandler- Returns:
- the opened ready to used client.
-
-