public class TransportClient extends AbstractClient
addTransportAddress(org.elasticsearch.common.transport.TransportAddress)
.
The transport client important modules used is the TransportModule
which is
started in client mode (only connects, no bind).
Modifier and Type | Class and Description |
---|---|
static class |
TransportClient.Builder
A builder used to create an instance of the transport client.
|
Modifier and Type | Field and Description |
---|---|
static String |
CLIENT_TYPE |
deprecationLogger, logger, settings
CLIENT_TYPE_SETTING
Modifier and Type | Method and Description |
---|---|
TransportClient |
addTransportAddress(TransportAddress transportAddress)
Adds a transport address that will be used to connect to.
|
TransportClient |
addTransportAddresses(TransportAddress... transportAddress)
Adds a list of transport addresses that will be used to connect to.
|
static TransportClient.Builder |
builder()
Handy method ot create a
TransportClient.Builder . |
void |
close()
Closes the client.
|
List<DiscoveryNode> |
connectedNodes()
Returns the current connected transport nodes that this client will use.
|
protected <Request extends ActionRequest,Response extends ActionResponse,RequestBuilder extends ActionRequestBuilder<Request,Response,RequestBuilder>> |
doExecute(Action<Request,Response,RequestBuilder> action,
Request request,
ActionListener<Response> listener) |
List<DiscoveryNode> |
filteredNodes()
The list of filtered nodes that were not connected to, for example, due to
mismatch in cluster name.
|
List<DiscoveryNode> |
listedNodes()
Returns the listed nodes in the transport client (ones added to it).
|
TransportClient |
removeTransportAddress(TransportAddress transportAddress)
Removes a transport address from the list of transport addresses that are used to connect to.
|
List<TransportAddress> |
transportAddresses()
Returns the current registered transport addresses to use (added using
addTransportAddress(org.elasticsearch.common.transport.TransportAddress) . |
admin, bulk, bulk, clearScroll, clearScroll, count, count, delete, delete, deleteIndexedScript, deleteIndexedScript, execute, execute, exists, exists, explain, explain, fieldStats, fieldStats, get, get, getIndexedScript, getIndexedScript, headers, index, index, multiGet, multiGet, multiPercolate, multiPercolate, multiSearch, multiSearch, multiTermVectors, multiTermVectors, percolate, percolate, prepareBulk, prepareClearScroll, prepareCount, prepareDelete, prepareDelete, prepareDeleteIndexedScript, prepareDeleteIndexedScript, prepareExecute, prepareExists, prepareExplain, prepareFieldStats, prepareGet, prepareGet, prepareGetIndexedScript, prepareGetIndexedScript, prepareIndex, prepareIndex, prepareIndex, prepareMultiGet, prepareMultiPercolate, prepareMultiSearch, prepareMultiTermVectors, preparePercolate, preparePutIndexedScript, preparePutIndexedScript, prepareSearch, prepareSearchScroll, prepareSuggest, prepareTermVector, prepareTermVector, prepareTermVectors, prepareTermVectors, prepareUpdate, prepareUpdate, putIndexedScript, putIndexedScript, search, search, searchScroll, searchScroll, settings, suggest, suggest, termVector, termVector, termVectors, termVectors, threadPool, update, update
logDeprecatedSetting, logRemovedSetting, nodeName
public static final String CLIENT_TYPE
public static TransportClient.Builder builder()
TransportClient.Builder
.public List<TransportAddress> transportAddresses()
addTransportAddress(org.elasticsearch.common.transport.TransportAddress)
.public List<DiscoveryNode> connectedNodes()
The nodes include all the nodes that are currently alive based on the transport addresses provided.
public List<DiscoveryNode> filteredNodes()
public List<DiscoveryNode> listedNodes()
public TransportClient addTransportAddress(TransportAddress transportAddress)
The Node this transport address represents will be used if its possible to connect to it. If it is unavailable, it will be automatically connected to once it is up.
In order to get the list of all the current connected nodes, please see connectedNodes()
.
public TransportClient addTransportAddresses(TransportAddress... transportAddress)
The Node this transport address represents will be used if its possible to connect to it. If it is unavailable, it will be automatically connected to once it is up.
In order to get the list of all the current connected nodes, please see connectedNodes()
.
public TransportClient removeTransportAddress(TransportAddress transportAddress)
public void close()
protected <Request extends ActionRequest,Response extends ActionResponse,RequestBuilder extends ActionRequestBuilder<Request,Response,RequestBuilder>> void doExecute(Action<Request,Response,RequestBuilder> action, Request request, ActionListener<Response> listener)
doExecute
in class AbstractClient
Copyright © 2009–2016. All rights reserved.