public class ElasticSearchMetricSender extends Object
| Constructor and Description |
|---|
ElasticSearchMetricSender(org.elasticsearch.client.RestClient cli,
String index,
String user,
String pwd) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToList(String metric)
This method adds a metric to the list (metricList).
|
void |
clearList()
This method clears the ElasticSearch documents list
|
void |
closeConnection()
This method closes the REST client
|
void |
createIndex()
This method creates the ElasticSearch index.
|
int |
getListSize()
This method returns the current size of the ElasticSearch documents list
|
void |
sendRequest()
This method sends the ElasticSearch documents for each document present in the list (metricList).
|
public int getListSize()
public void closeConnection()
throws IOException
IOExceptionpublic void clearList()
public void addToList(String metric)
metric - String parameter representing a JSON document for ElasticSearchpublic void createIndex()
public void sendRequest()
Copyright © 2019. All rights reserved.