public class LocalTransport extends AbstractLifecycleComponent<Transport> implements Transport
Transport.TransportSettings| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL_TRANSPORT_THREAD_NAME_PREFIX |
static String |
TRANSPORT_LOCAL_ADDRESS |
static String |
TRANSPORT_LOCAL_QUEUE |
static String |
TRANSPORT_LOCAL_WORKERS |
lifecycledeprecationLogger, logger, settings| Constructor and Description |
|---|
LocalTransport(Settings settings,
ThreadPool threadPool,
Version version,
NamedWriteableRegistry namedWriteableRegistry,
CircuitBreakerService circuitBreakerService) |
| Modifier and Type | Method and Description |
|---|---|
TransportAddress[] |
addressesFromString(String address,
int perAddressLimit)
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() |
List<String> |
getLocalAddresses() |
protected void |
handleParsedResponse(TransportResponse response,
TransportResponseHandler handler) |
protected void |
handleResponse(StreamInput buffer,
LocalTransport sourceTransport,
TransportResponseHandler handler) |
protected void |
messageReceived(byte[] data,
String action,
LocalTransport sourceTransport,
Version version,
Long sendRequestId) |
boolean |
nodeConnected(DiscoveryNode node)
Returns true if the node is connected.
|
Map<String,BoundTransportAddress> |
profileBoundAddresses()
Further profile bound addresses
|
void |
sendRequest(DiscoveryNode node,
long requestId,
String action,
TransportRequest request,
TransportRequestOptions options)
Sends the request to the node.
|
long |
serverOpen()
Returns count of currently open connections
|
void |
transportServiceAdapter(TransportServiceAdapter transportServiceAdapter) |
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stoplogDeprecatedSetting, logRemovedSetting, nodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, lifecycleState, removeLifecycleListener, start, stopclosepublic static final String LOCAL_TRANSPORT_THREAD_NAME_PREFIX
public static final String TRANSPORT_LOCAL_ADDRESS
public static final String TRANSPORT_LOCAL_WORKERS
public static final String TRANSPORT_LOCAL_QUEUE
@Inject public LocalTransport(Settings settings, ThreadPool threadPool, Version version, NamedWriteableRegistry namedWriteableRegistry, CircuitBreakerService circuitBreakerService)
public TransportAddress[] addressesFromString(String address, int perAddressLimit)
TransportaddressesFromString in interface Transportpublic boolean addressSupported(Class<? extends TransportAddress> address)
TransportaddressSupported in interface Transportprotected void doStart()
doStart in class AbstractLifecycleComponent<Transport>protected void doStop()
doStop in class AbstractLifecycleComponent<Transport>protected void doClose()
doClose in class AbstractLifecycleComponent<Transport>public void transportServiceAdapter(TransportServiceAdapter transportServiceAdapter)
transportServiceAdapter in interface Transportpublic BoundTransportAddress boundAddress()
TransportboundAddress in interface Transportpublic Map<String,BoundTransportAddress> profileBoundAddresses()
TransportprofileBoundAddresses in interface Transportpublic boolean nodeConnected(DiscoveryNode node)
TransportnodeConnected in interface Transportpublic void connectToNodeLight(DiscoveryNode node) throws ConnectTransportException
TransportconnectToNodeLight in interface TransportConnectTransportExceptionpublic void connectToNode(DiscoveryNode node) throws ConnectTransportException
TransportconnectToNode in interface TransportConnectTransportExceptionpublic void disconnectFromNode(DiscoveryNode node)
TransportdisconnectFromNode in interface Transportpublic long serverOpen()
TransportserverOpen in interface Transportpublic void sendRequest(DiscoveryNode node, long requestId, String action, TransportRequest request, TransportRequestOptions options) throws IOException, TransportException
TransportsendRequest in interface TransportIOExceptionTransportExceptionprotected void messageReceived(byte[] data,
String action,
LocalTransport sourceTransport,
Version version,
@Nullable
Long sendRequestId)
protected void handleResponse(StreamInput buffer, LocalTransport sourceTransport, TransportResponseHandler handler)
protected void handleParsedResponse(TransportResponse response, TransportResponseHandler handler)
public List<String> getLocalAddresses()
getLocalAddresses in interface TransportCopyright © 2009–2017. All rights reserved.