Class MockNioTransport

java.lang.Object
org.opensearch.common.lifecycle.AbstractLifecycleComponent
org.opensearch.transport.TcpTransport
org.opensearch.transport.nio.MockNioTransport
All Implemented Interfaces:
Closeable, AutoCloseable, org.opensearch.common.lease.Releasable, org.opensearch.common.lifecycle.LifecycleComponent, org.opensearch.transport.Transport
Direct Known Subclasses:
MockStreamNioTransport

public class MockNioTransport extends org.opensearch.transport.TcpTransport
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     

    Nested classes/interfaces inherited from class org.opensearch.transport.TcpTransport

    org.opensearch.transport.TcpTransport.HttpRequestOnTransportException, org.opensearch.transport.TcpTransport.NodeChannels, org.opensearch.transport.TcpTransport.ProfileSettings

    Nested classes/interfaces inherited from interface org.opensearch.transport.Transport

    org.opensearch.transport.Transport.Connection, org.opensearch.transport.Transport.RequestHandlers, org.opensearch.transport.Transport.ResponseContext<T extends org.opensearch.core.transport.TransportResponse>, org.opensearch.transport.Transport.ResponseHandlers
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.opensearch.transport.nio.MockNioTransport.MockTcpChannelFactory
     
    protected org.opensearch.nio.NioSelectorGroup
     

    Fields inherited from class org.opensearch.transport.TcpTransport

    inboundHandler, networkService, pageCacheRecycler, profileSettings, settings, threadPool, TRANSPORT_WORKER_THREAD_NAME_PREFIX

    Fields inherited from class org.opensearch.common.lifecycle.AbstractLifecycleComponent

    lifecycle
  • Constructor Summary

    Constructors
    Constructor
    Description
    MockNioTransport(org.opensearch.common.settings.Settings settings, org.opensearch.Version version, org.opensearch.threadpool.ThreadPool threadPool, org.opensearch.common.network.NetworkService networkService, org.opensearch.common.util.PageCacheRecycler pageCacheRecycler, org.opensearch.core.common.io.stream.NamedWriteableRegistry namedWriteableRegistry, org.opensearch.core.indices.breaker.CircuitBreakerService circuitBreakerService, org.opensearch.telemetry.tracing.Tracer tracer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.opensearch.transport.nio.MockNioTransport.MockServerChannel
    bind(String name, InetSocketAddress address)
     
    protected void
     
    initiateChannel(org.opensearch.cluster.node.DiscoveryNode node)
     
    protected org.opensearch.transport.ConnectionProfile
    maybeOverrideConnectionProfile(org.opensearch.transport.ConnectionProfile connectionProfile)
     
    protected void
     

    Methods inherited from class org.opensearch.transport.TcpTransport

    addressesFromString, bindServer, boundAddress, createInboundHandler, doClose, doStop, ensureOpen, executeHandshake, getDefaultSeedAddresses, getInflightBreaker, getPageCacheRecycler, getProfileSettings, getRequestHandlers, getResponseHandlers, getStats, getStatsTracker, getThreadPool, getVersion, inboundMessage, inboundMessage, onException, onServerException, openConnection, profileBoundAddresses, readMessageLength, serverAcceptedChannel, setMessageListener, setSlowLogThreshold

    Methods inherited from class org.opensearch.common.lifecycle.AbstractLifecycleComponent

    addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opensearch.common.lifecycle.LifecycleComponent

    addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop

    Methods inherited from interface org.opensearch.common.lease.Releasable

    close

    Methods inherited from interface org.opensearch.transport.Transport

    isSecure, registerRequestHandler
  • Field Details

    • nioGroup

      protected volatile org.opensearch.nio.NioSelectorGroup nioGroup
    • clientChannelFactory

      protected volatile org.opensearch.transport.nio.MockNioTransport.MockTcpChannelFactory clientChannelFactory
  • Constructor Details

    • MockNioTransport

      public MockNioTransport(org.opensearch.common.settings.Settings settings, org.opensearch.Version version, org.opensearch.threadpool.ThreadPool threadPool, org.opensearch.common.network.NetworkService networkService, org.opensearch.common.util.PageCacheRecycler pageCacheRecycler, org.opensearch.core.common.io.stream.NamedWriteableRegistry namedWriteableRegistry, org.opensearch.core.indices.breaker.CircuitBreakerService circuitBreakerService, org.opensearch.telemetry.tracing.Tracer tracer)
  • Method Details

    • bind

      protected org.opensearch.transport.nio.MockNioTransport.MockServerChannel bind(String name, InetSocketAddress address) throws IOException
      Specified by:
      bind in class org.opensearch.transport.TcpTransport
      Throws:
      IOException
    • initiateChannel

      protected MockNioTransport.MockSocketChannel initiateChannel(org.opensearch.cluster.node.DiscoveryNode node) throws IOException
      Specified by:
      initiateChannel in class org.opensearch.transport.TcpTransport
      Throws:
      IOException
    • doStart

      protected void doStart()
      Overrides:
      doStart in class org.opensearch.transport.TcpTransport
    • stopInternal

      protected void stopInternal()
      Specified by:
      stopInternal in class org.opensearch.transport.TcpTransport
    • maybeOverrideConnectionProfile

      protected org.opensearch.transport.ConnectionProfile maybeOverrideConnectionProfile(org.opensearch.transport.ConnectionProfile connectionProfile)
      Overrides:
      maybeOverrideConnectionProfile in class org.opensearch.transport.TcpTransport