Class TransportClient
java.lang.Object
org.elasticsearch.client.support.AbstractClient
org.elasticsearch.client.transport.TransportClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Client
,ElasticsearchClient
,org.elasticsearch.core.Releasable
Deprecated.
The transport client allows to create a client that is not part of the cluster, but simply connects to one
or more nodes directly by adding their respective addresses using
addTransportAddress(org.elasticsearch.common.transport.TransportAddress)
.
The transport client important modules used is the NetworkModule
which is
started in client mode (only connects, no bind).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Deprecated.Listener that allows to be notified whenever a node failure / disconnect happens -
Field Summary
Modifier and TypeFieldDescriptionDeprecated.static Setting<org.elasticsearch.core.TimeValue>
Deprecated.static Setting<org.elasticsearch.core.TimeValue>
Deprecated.Deprecated.static String
Deprecated.protected NamedWriteableRegistry
Deprecated.static String
Deprecated.Fields inherited from class org.elasticsearch.client.support.AbstractClient
logger, settings
Fields inherited from interface org.elasticsearch.client.Client
CLIENT_TYPE_SETTING_S
-
Constructor Summary
ModifierConstructorDescriptionTransportClient(Settings settings, Collection<Class<? extends Plugin>> plugins)
Deprecated.Creates a new TransportClient with the given settings and pluginsprotected
TransportClient(Settings settings, Settings defaultSettings, Collection<Class<? extends Plugin>> plugins, TransportClient.HostFailureListener hostFailureListener)
Deprecated.Creates a new TransportClient with the given settings, defaults and plugins. -
Method Summary
Modifier and TypeMethodDescriptionprotected static Collection<Class<? extends Plugin>>
addPlugins(Collection<Class<? extends Plugin>> collection, Class<? extends Plugin>... plugins)
Deprecated.protected static Collection<Class<? extends Plugin>>
addPlugins(Collection<Class<? extends Plugin>> collection, Collection<Class<? extends Plugin>> plugins)
Deprecated.addTransportAddress(TransportAddress transportAddress)
Deprecated.Adds a transport address that will be used to connect to.addTransportAddresses(TransportAddress... transportAddress)
Deprecated.Adds a list of transport addresses that will be used to connect to.void
close()
Deprecated.Closes the client.Deprecated.Returns the current connected transport nodes that this client will use.protected <Request extends ActionRequest, Response extends ActionResponse>
voiddoExecute(ActionType<Response> action, Request request, ActionListener<Response> listener)
Deprecated.Deprecated.The list of filtered nodes that were not connected to, for example, due to mismatch in cluster name.Deprecated.Returns the listed nodes in the transport client (ones added to it).removeTransportAddress(TransportAddress transportAddress)
Deprecated.Removes a transport address from the list of transport addresses that are used to connect to.Deprecated.Returns the current registered transport addresses to use (added usingaddTransportAddress(org.elasticsearch.common.transport.TransportAddress)
.Methods inherited from class org.elasticsearch.client.support.AbstractClient
admin, bulk, bulk, clearScroll, clearScroll, delete, delete, execute, execute, explain, explain, fieldCaps, fieldCaps, filterWithHeader, get, get, index, index, multiGet, multiGet, multiSearch, multiSearch, multiTermVectors, multiTermVectors, prepareBulk, prepareBulk, prepareClearScroll, prepareDelete, prepareDelete, prepareExplain, prepareFieldCaps, prepareGet, prepareGet, prepareIndex, prepareIndex, prepareIndex, prepareMultiGet, prepareMultiSearch, prepareMultiTermVectors, prepareSearch, prepareSearchScroll, prepareTermVectors, prepareTermVectors, prepareUpdate, prepareUpdate, search, search, searchScroll, searchScroll, settings, termVectors, termVectors, threadPool, update, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.client.Client
getRemoteClusterClient
-
Field Details
-
CLIENT_TRANSPORT_NODES_SAMPLER_INTERVAL
public static final Setting<org.elasticsearch.core.TimeValue> CLIENT_TRANSPORT_NODES_SAMPLER_INTERVALDeprecated. -
CLIENT_TRANSPORT_PING_TIMEOUT
Deprecated. -
CLIENT_TRANSPORT_IGNORE_CLUSTER_NAME
Deprecated. -
CLIENT_TRANSPORT_SNIFF
Deprecated. -
TRANSPORT_CLIENT_FEATURE
Deprecated.- See Also:
- Constant Field Values
-
CLIENT_TYPE
Deprecated.- See Also:
- Constant Field Values
-
namedWriteableRegistry
Deprecated.
-
-
Constructor Details
-
TransportClient
Deprecated.Creates a new TransportClient with the given settings and plugins -
TransportClient
protected TransportClient(Settings settings, Settings defaultSettings, Collection<Class<? extends Plugin>> plugins, TransportClient.HostFailureListener hostFailureListener)Deprecated.Creates a new TransportClient with the given settings, defaults and plugins.- Parameters:
settings
- the client settingsdefaultSettings
- default settings that are merged after the plugins have added it's additional settings.plugins
- the client plugins
-
-
Method Details
-
addPlugins
protected static Collection<Class<? extends Plugin>> addPlugins(Collection<Class<? extends Plugin>> collection, Class<? extends Plugin>... plugins)Deprecated. -
addPlugins
protected static Collection<Class<? extends Plugin>> addPlugins(Collection<Class<? extends Plugin>> collection, Collection<Class<? extends Plugin>> plugins)Deprecated. -
transportAddresses
Deprecated.Returns the current registered transport addresses to use (added usingaddTransportAddress(org.elasticsearch.common.transport.TransportAddress)
. -
connectedNodes
Deprecated.Returns the current connected transport nodes that this client will use.The nodes include all the nodes that are currently alive based on the transport addresses provided.
-
filteredNodes
Deprecated.The list of filtered nodes that were not connected to, for example, due to mismatch in cluster name. -
listedNodes
Deprecated.Returns the listed nodes in the transport client (ones added to it). -
addTransportAddress
Deprecated.Adds a transport address that will be used to connect to.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()
. -
addTransportAddresses
Deprecated.Adds a list of transport addresses that will be used to connect to.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()
. -
removeTransportAddress
Deprecated.Removes a transport address from the list of transport addresses that are used to connect to. -
close
public void close()Deprecated.Closes the client. -
doExecute
protected <Request extends ActionRequest, Response extends ActionResponse> void doExecute(ActionType<Response> action, Request request, ActionListener<Response> listener)Deprecated.- Specified by:
doExecute
in classAbstractClient
-
TransportClient
is deprecated in favour of the High Level REST client and will be removed in Elasticsearch 8.0.