org.elasticsearch.transport.local
Class LocalTransport

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.common.component.AbstractLifecycleComponent<Transport>
          extended by org.elasticsearch.transport.local.LocalTransport
All Implemented Interfaces:
CloseableComponent, LifecycleComponent<Transport>, Transport

public class LocalTransport
extends AbstractLifecycleComponent<Transport>
implements Transport


Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
LocalTransport(Settings settings, ThreadPool threadPool)
           
LocalTransport(ThreadPool threadPool)
           
 
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.
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 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 transportServiceAdapter)
           
 
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
 
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
 
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.common.component.CloseableComponent
close
 

Constructor Detail

LocalTransport

public LocalTransport(ThreadPool threadPool)

LocalTransport

@Inject
public LocalTransport(Settings settings,
                             ThreadPool threadPool)
Method Detail

addressesFromString

public TransportAddress[] addressesFromString(String address)
Description copied from interface: Transport
Returns an address from its string representation.

Specified by:
addressesFromString in interface Transport

addressSupported

public boolean addressSupported(Class<? extends TransportAddress> address)
Description copied from interface: Transport
Is the address type supported.

Specified by:
addressSupported in interface Transport

doStart

protected void doStart()
                throws ElasticSearchException
Specified by:
doStart in class AbstractLifecycleComponent<Transport>
Throws:
ElasticSearchException

doStop

protected void doStop()
               throws ElasticSearchException
Specified by:
doStop in class AbstractLifecycleComponent<Transport>
Throws:
ElasticSearchException

doClose

protected void doClose()
                throws ElasticSearchException
Specified by:
doClose in class AbstractLifecycleComponent<Transport>
Throws:
ElasticSearchException

transportServiceAdapter

public void transportServiceAdapter(TransportServiceAdapter transportServiceAdapter)
Specified by:
transportServiceAdapter in interface Transport

boundAddress

public BoundTransportAddress boundAddress()
Description copied from interface: Transport
The address the transport is bound on.

Specified by:
boundAddress in interface Transport

nodeConnected

public boolean nodeConnected(DiscoveryNode node)
Description copied from interface: Transport
Returns true if the node is connected.

Specified by:
nodeConnected in interface Transport

connectToNodeLight

public void connectToNodeLight(DiscoveryNode node)
                        throws ConnectTransportException
Description copied from interface: Transport
Connects to a node in a light manner. Used when just connecting for ping and then disconnecting.

Specified by:
connectToNodeLight in interface Transport
Throws:
ConnectTransportException

connectToNode

public void connectToNode(DiscoveryNode node)
                   throws ConnectTransportException
Description copied from interface: Transport
Connects to the given node, if already connected, does nothing.

Specified by:
connectToNode in interface Transport
Throws:
ConnectTransportException

disconnectFromNode

public void disconnectFromNode(DiscoveryNode node)
Description copied from interface: Transport
Disconnected from the given node, if not connected, will do nothing.

Specified by:
disconnectFromNode in interface Transport

serverOpen

public long serverOpen()
Specified by:
serverOpen in interface Transport

sendRequest

public <T extends Streamable> void sendRequest(DiscoveryNode node,
                                               long requestId,
                                               String action,
                                               Streamable message,
                                               TransportRequestOptions options)
                 throws IOException,
                        TransportException
Description copied from interface: Transport
Sends the request to the node.

Specified by:
sendRequest in interface Transport
Throws:
IOException
TransportException


Copyright © 2009-2012. All Rights Reserved.