org.elasticsearch.transport
Interface Transport

All Superinterfaces:
CloseableComponent, LifecycleComponent<Transport>
All Known Implementing Classes:
LocalTransport, NettyTransport

public interface Transport
extends LifecycleComponent<Transport>


Method Summary
 TransportAddress[] addressesFromString(String address)
          Returns an address from its string representation.
 boolean addressSupported(Class<? extends TransportAddress> address)
          Is the address type supported.
 BoundTransportAddress boundAddress()
          The address the transport is bound on.
 void connectToNode(DiscoveryNode node)
          Connects to the given node, if already connected, does nothing.
 void connectToNodeLight(DiscoveryNode node)
          Connects to a node in a light manner.
 void disconnectFromNode(DiscoveryNode node)
          Disconnected from the given node, if not connected, will do nothing.
 boolean nodeConnected(DiscoveryNode node)
          Returns true if the node is connected.
<T extends Streamable>
void
sendRequest(DiscoveryNode node, long requestId, String action, Streamable message, TransportRequestOptions options)
          Sends the request to the node.
 long serverOpen()
           
 void transportServiceAdapter(TransportServiceAdapter service)
           
 
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.common.component.CloseableComponent
close
 

Method Detail

transportServiceAdapter

void transportServiceAdapter(TransportServiceAdapter service)

boundAddress

BoundTransportAddress boundAddress()
The address the transport is bound on.


addressesFromString

TransportAddress[] addressesFromString(String address)
                                       throws Exception
Returns an address from its string representation.

Throws:
Exception

addressSupported

boolean addressSupported(Class<? extends TransportAddress> address)
Is the address type supported.


nodeConnected

boolean nodeConnected(DiscoveryNode node)
Returns true if the node is connected.


connectToNode

void connectToNode(DiscoveryNode node)
                   throws ConnectTransportException
Connects to the given node, if already connected, does nothing.

Throws:
ConnectTransportException

connectToNodeLight

void connectToNodeLight(DiscoveryNode node)
                        throws ConnectTransportException
Connects to a node in a light manner. Used when just connecting for ping and then disconnecting.

Throws:
ConnectTransportException

disconnectFromNode

void disconnectFromNode(DiscoveryNode node)
Disconnected from the given node, if not connected, will do nothing.


sendRequest

<T extends Streamable> void sendRequest(DiscoveryNode node,
                                        long requestId,
                                        String action,
                                        Streamable message,
                                        TransportRequestOptions options)
                 throws IOException,
                        TransportException
Sends the request to the node.

Throws:
IOException
TransportException

serverOpen

long serverOpen()


Copyright © 2009-2012. All Rights Reserved.