Package org.elasticsearch.transport
Class RemoteConnectionStrategy
java.lang.Object
org.elasticsearch.transport.RemoteConnectionStrategy
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,TransportConnectionListener
- Direct Known Subclasses:
ProxyConnectionStrategy,SniffConnectionStrategy
public abstract class RemoteConnectionStrategy extends java.lang.Object implements TransportConnectionListener, java.io.Closeable
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringclusterAliasprotected RemoteConnectionManagerconnectionManagerstatic Setting.AffixSetting<org.elasticsearch.transport.RemoteConnectionStrategy.ConnectionStrategy>REMOTE_CONNECTION_MODEprotected TransportServicetransportService -
Method Summary
Modifier and Type Method Description voidclose()protected abstract voidconnectImpl(ActionListener<java.lang.Void> listener)protected abstract RemoteConnectionInfo.ModeInfogetModeInfo()booleanisClosed()static booleanisConnectionEnabled(java.lang.String clusterAlias, java.util.Map<Setting<?>,java.lang.Object> settings)static booleanisConnectionEnabled(java.lang.String clusterAlias, Settings settings)voidonNodeDisconnected(DiscoveryNode node, Transport.Connection connection)Called once a node connection is closed and unregistered.protected abstract booleanshouldOpenMoreConnections()protected abstract booleanstrategyMustBeRebuilt(Settings newSettings)protected abstract org.elasticsearch.transport.RemoteConnectionStrategy.ConnectionStrategystrategyType()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.transport.TransportConnectionListener
onConnectionClosed, onConnectionOpened, onNodeConnected
-
Field Details
-
REMOTE_CONNECTION_MODE
public static final Setting.AffixSetting<org.elasticsearch.transport.RemoteConnectionStrategy.ConnectionStrategy> REMOTE_CONNECTION_MODE -
transportService
-
connectionManager
-
clusterAlias
protected final java.lang.String clusterAlias
-
-
Method Details
-
isConnectionEnabled
-
isConnectionEnabled
public static boolean isConnectionEnabled(java.lang.String clusterAlias, java.util.Map<Setting<?>,java.lang.Object> settings) -
strategyMustBeRebuilt
-
strategyType
protected abstract org.elasticsearch.transport.RemoteConnectionStrategy.ConnectionStrategy strategyType() -
onNodeDisconnected
Description copied from interface:TransportConnectionListenerCalled once a node connection is closed and unregistered.- Specified by:
onNodeDisconnectedin interfaceTransportConnectionListener
-
close
public void close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
isClosed
public boolean isClosed() -
shouldOpenMoreConnections
protected abstract boolean shouldOpenMoreConnections() -
connectImpl
-
getModeInfo
-