Package org.opensearch.transport
Class RemoteConnectionStrategy
java.lang.Object
org.opensearch.transport.RemoteConnectionStrategy
- All Implemented Interfaces:
Closeable
,AutoCloseable
,TransportConnectionListener
- Direct Known Subclasses:
ProxyConnectionStrategy
,SniffConnectionStrategy
public abstract class RemoteConnectionStrategy
extends Object
implements TransportConnectionListener, Closeable
Strategy to connect to remote nodes
- Opensearch.internal:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Strategy to connect to remote nodes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String
protected final RemoteConnectionManager
protected final org.apache.logging.log4j.Logger
protected final TransportService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected abstract void
connectImpl
(org.opensearch.core.action.ActionListener<Void> listener) protected abstract RemoteConnectionInfo.ModeInfo
boolean
isClosed()
static boolean
isConnectionEnabled
(String clusterAlias, Map<Setting<?>, Object> settings) static boolean
isConnectionEnabled
(String clusterAlias, Settings settings) void
onNodeDisconnected
(DiscoveryNode node, Transport.Connection connection) Called once a node connection is closed and unregistered.protected abstract boolean
protected abstract boolean
strategyMustBeRebuilt
(Settings newSettings) protected abstract RemoteConnectionStrategy.ConnectionStrategy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensearch.transport.TransportConnectionListener
onConnectionClosed, onConnectionOpened, onNodeConnected
-
Field Details
-
REMOTE_CONNECTION_MODE
public static final Setting.AffixSetting<RemoteConnectionStrategy.ConnectionStrategy> REMOTE_CONNECTION_MODE -
REMOTE_MAX_PENDING_CONNECTION_LISTENERS
-
logger
protected final org.apache.logging.log4j.Logger logger -
transportService
-
connectionManager
-
clusterAlias
-
-
Method Details
-
isConnectionEnabled
-
isConnectionEnabled
-
strategyMustBeRebuilt
-
strategyType
-
onNodeDisconnected
Description copied from interface:TransportConnectionListener
Called once a node connection is closed and unregistered.- Specified by:
onNodeDisconnected
in interfaceTransportConnectionListener
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
isClosed
public boolean isClosed() -
shouldOpenMoreConnections
protected abstract boolean shouldOpenMoreConnections() -
connectImpl
-
getModeInfo
-