org.elasticsearch.client.transport
Class TransportClientNodesService

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.client.transport.TransportClientNodesService
All Implemented Interfaces:
ClusterStateListener

public class TransportClientNodesService
extends AbstractComponent
implements ClusterStateListener


Nested Class Summary
static interface TransportClientNodesService.NodeCallback<T>
           
 
Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
TransportClientNodesService(Settings settings, ClusterName clusterName, TransportService transportService, ThreadPool threadPool)
           
 
Method Summary
 TransportClientNodesService addTransportAddress(TransportAddress transportAddress)
           
 void close()
           
 void clusterChanged(ClusterChangedEvent event)
          Called when cluster state changes.
 org.elasticsearch.common.collect.ImmutableList<DiscoveryNode> connectedNodes()
           
<T> T
execute(TransportClientNodesService.NodeCallback<T> callback)
           
 TransportClientNodesService removeTransportAddress(TransportAddress transportAddress)
           
 org.elasticsearch.common.collect.ImmutableList<TransportAddress> transportAddresses()
           
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportClientNodesService

@Inject
public TransportClientNodesService(Settings settings,
                                          ClusterName clusterName,
                                          TransportService transportService,
                                          ThreadPool threadPool)
Method Detail

transportAddresses

public org.elasticsearch.common.collect.ImmutableList<TransportAddress> transportAddresses()

connectedNodes

public org.elasticsearch.common.collect.ImmutableList<DiscoveryNode> connectedNodes()

addTransportAddress

public TransportClientNodesService addTransportAddress(TransportAddress transportAddress)

removeTransportAddress

public TransportClientNodesService removeTransportAddress(TransportAddress transportAddress)

execute

public <T> T execute(TransportClientNodesService.NodeCallback<T> callback)
          throws ElasticSearchException
Throws:
ElasticSearchException

close

public void close()

clusterChanged

public void clusterChanged(ClusterChangedEvent event)
Description copied from interface: ClusterStateListener
Called when cluster state changes.

Specified by:
clusterChanged in interface ClusterStateListener