Package org.exoplatform.analytics.es
Class AnalyticsESClient
- java.lang.Object
-
- org.exoplatform.commons.search.es.client.ElasticClient
-
- org.exoplatform.analytics.es.AnalyticsESClient
-
public class AnalyticsESClient extends org.exoplatform.commons.search.es.client.ElasticClient
-
-
Field Summary
Fields Modifier and Type Field Description static DateTimeFormatterDAY_DATE_FORMATTER
-
Constructor Summary
Constructors Constructor Description AnalyticsESClient(org.exoplatform.container.configuration.ConfigurationManager configurationManager, AnalyticsElasticContentRequestBuilder elasticContentRequestBuilder, AnalyticsIndexingServiceConnector analyticsIndexingConnector, org.exoplatform.commons.search.es.client.ElasticIndexingAuditTrail auditTrail, org.exoplatform.container.xml.InitParams initParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.http.conn.HttpClientConnectionManagergetClientConnectionManager()protected StringgetEsPasswordProperty()protected StringgetEsUsernameProperty()intgetIndexPerDays()StringgetIndexSuffix(long timestamp)voidinit()voidrefreshIndex()voidrefreshIndex(String index)StringretrieveAllAnalyticsIndexesMapping()voidsendCreateBulkDocumentsRequest(List<org.exoplatform.analytics.model.StatisticDataQueueEntry> dataQueueEntries)booleansendCreateIndexRequest(String index)org.exoplatform.commons.search.es.client.ElasticResponsesendHttpDeleteRequest(String uri)org.exoplatform.commons.search.es.client.ElasticResponsesendHttpGetRequest(String uri)org.exoplatform.commons.search.es.client.ElasticResponsesendHttpGetRequest(String urlClient, String uri)protected org.exoplatform.commons.search.es.client.ElasticResponsesendHttpHeadRequest(String uri)org.exoplatform.commons.search.es.client.ElasticResponsesendHttpPostRequest(String uri, String content)org.exoplatform.commons.search.es.client.ElasticResponsesendHttpPutRequest(String uri, String content)booleansendIsIndexExistsRequest(String esIndex)booleansendIsIndexTemplateExistsRequest()StringsendRequest(String esQuery)voidsendTurnOffWriteOnAllAnalyticsIndexes()
-
-
-
Field Detail
-
DAY_DATE_FORMATTER
public static final DateTimeFormatter DAY_DATE_FORMATTER
-
-
Constructor Detail
-
AnalyticsESClient
public AnalyticsESClient(org.exoplatform.container.configuration.ConfigurationManager configurationManager, AnalyticsElasticContentRequestBuilder elasticContentRequestBuilder, AnalyticsIndexingServiceConnector analyticsIndexingConnector, org.exoplatform.commons.search.es.client.ElasticIndexingAuditTrail auditTrail, org.exoplatform.container.xml.InitParams initParams)
-
-
Method Detail
-
init
public void init()
-
sendCreateIndexRequest
public boolean sendCreateIndexRequest(String index)
-
sendTurnOffWriteOnAllAnalyticsIndexes
public void sendTurnOffWriteOnAllAnalyticsIndexes()
-
sendIsIndexExistsRequest
public boolean sendIsIndexExistsRequest(String esIndex)
-
sendIsIndexTemplateExistsRequest
public boolean sendIsIndexTemplateExistsRequest()
-
sendCreateBulkDocumentsRequest
public void sendCreateBulkDocumentsRequest(List<org.exoplatform.analytics.model.StatisticDataQueueEntry> dataQueueEntries)
-
retrieveAllAnalyticsIndexesMapping
public String retrieveAllAnalyticsIndexesMapping()
-
sendHttpHeadRequest
protected org.exoplatform.commons.search.es.client.ElasticResponse sendHttpHeadRequest(String uri)
- Overrides:
sendHttpHeadRequestin classorg.exoplatform.commons.search.es.client.ElasticClient
-
sendHttpGetRequest
public org.exoplatform.commons.search.es.client.ElasticResponse sendHttpGetRequest(String uri)
- Overrides:
sendHttpGetRequestin classorg.exoplatform.commons.search.es.client.ElasticClient
-
sendHttpGetRequest
public org.exoplatform.commons.search.es.client.ElasticResponse sendHttpGetRequest(String urlClient, String uri)
-
sendHttpPutRequest
public org.exoplatform.commons.search.es.client.ElasticResponse sendHttpPutRequest(String uri, String content)
- Overrides:
sendHttpPutRequestin classorg.exoplatform.commons.search.es.client.ElasticClient
-
sendHttpDeleteRequest
public org.exoplatform.commons.search.es.client.ElasticResponse sendHttpDeleteRequest(String uri)
- Overrides:
sendHttpDeleteRequestin classorg.exoplatform.commons.search.es.client.ElasticClient
-
sendHttpPostRequest
public org.exoplatform.commons.search.es.client.ElasticResponse sendHttpPostRequest(String uri, String content)
- Overrides:
sendHttpPostRequestin classorg.exoplatform.commons.search.es.client.ElasticClient
-
getIndexSuffix
public String getIndexSuffix(long timestamp)
-
refreshIndex
public void refreshIndex()
-
refreshIndex
public void refreshIndex(String index)
-
getIndexPerDays
public int getIndexPerDays()
-
getEsUsernameProperty
protected String getEsUsernameProperty()
- Specified by:
getEsUsernamePropertyin classorg.exoplatform.commons.search.es.client.ElasticClient
-
getEsPasswordProperty
protected String getEsPasswordProperty()
- Specified by:
getEsPasswordPropertyin classorg.exoplatform.commons.search.es.client.ElasticClient
-
getClientConnectionManager
protected org.apache.http.conn.HttpClientConnectionManager getClientConnectionManager()
- Specified by:
getClientConnectionManagerin classorg.exoplatform.commons.search.es.client.ElasticClient
-
-