Search in sources :

Example 1 with Bootstrap

use of com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap in project couchbase-jvm-clients by couchbase.

the class KeyValueChannelIntegrationTest method failWithInvalidPasswordCredential.

@Test
@IgnoreWhen(clusterTypes = ClusterType.MOCKED)
void failWithInvalidPasswordCredential() throws Exception {
    TestNodeConfig node = config().nodes().get(0);
    Bootstrap bootstrap = new Bootstrap().remoteAddress(node.hostname(), node.ports().get(Services.KV)).group(eventLoopGroup).channel(NioSocketChannel.class).handler(new ChannelInitializer<SocketChannel>() {

        @Override
        protected void initChannel(SocketChannel ch) {
            new KeyValueEndpoint.KeyValuePipelineInitializer(endpointContext, Optional.of(config().bucketname()), PasswordAuthenticator.create(config().adminUsername(), "djslkfsdfsoufhoshfoishgs")).init(null, ch.pipeline());
        }
    });
    assertAuthenticationFailure(bootstrap, "Authentication Failure");
}
Also used : NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) SocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.SocketChannel) NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) Bootstrap(com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap) IgnoreWhen(com.couchbase.client.test.IgnoreWhen) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) Test(org.junit.jupiter.api.Test)

Example 2 with Bootstrap

use of com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap in project couchbase-jvm-clients by couchbase.

the class BaseEndpoint method reconnect.

/**
 * This method performs the actual connecting logic.
 *
 * <p>It is called reconnect since it works both in the case where an initial attempt is made
 * but also when the underlying channel is closed or the previous connect attempt was
 * unsuccessful.</p>
 */
private void reconnect() {
    if (disconnect.get()) {
        return;
    }
    state.transition(EndpointState.CONNECTING);
    final EndpointContext endpointContext = this.endpointContext.get();
    final AtomicLong attemptStart = new AtomicLong();
    Mono.defer((Supplier<Mono<Channel>>) () -> {
        CoreEnvironment env = endpointContext.environment();
        long connectTimeoutMs = env.timeoutConfig().connectTimeout().toMillis();
        if (eventLoopGroup.isShutdown()) {
            throw new IllegalStateException("Event Loop is already shut down, not pursuing connect attempt!");
        }
        final Bootstrap channelBootstrap = new Bootstrap().remoteAddress(remoteAddress()).group(eventLoopGroup).channel(channelFrom(eventLoopGroup)).option(ChannelOption.CONNECT_TIMEOUT_MILLIS, (int) connectTimeoutMs).handler(new ChannelInitializer<Channel>() {

            @Override
            protected void initChannel(final Channel ch) {
                ChannelPipeline pipeline = ch.pipeline();
                SecurityConfig config = env.securityConfig();
                if (config.tlsEnabled()) {
                    try {
                        pipeline.addFirst(SslHandlerFactory.get(ch.alloc(), config, endpointContext));
                    } catch (Exception e) {
                        throw new SecurityException("Could not instantiate SSL Handler", e);
                    }
                }
                if (env.ioConfig().servicesToCapture().contains(serviceType)) {
                    pipeline.addLast(new TrafficCaptureHandler(endpointContext));
                }
                pipelineInitializer().init(BaseEndpoint.this, pipeline);
                pipeline.addLast(new PipelineErrorHandler(BaseEndpoint.this));
            }
        });
        if (env.ioConfig().tcpKeepAlivesEnabled() && !(eventLoopGroup instanceof DefaultEventLoopGroup)) {
            channelBootstrap.option(ChannelOption.SO_KEEPALIVE, true);
            if (eventLoopGroup instanceof EpollEventLoopGroup) {
                channelBootstrap.option(EpollChannelOption.TCP_KEEPIDLE, (int) TimeUnit.MILLISECONDS.toSeconds(env.ioConfig().tcpKeepAliveTime().toMillis()));
            }
        }
        state.transition(EndpointState.CONNECTING);
        attemptStart.set(System.nanoTime());
        return channelFutureIntoMono(channelBootstrap.connect());
    }).timeout(endpointContext.environment().timeoutConfig().connectTimeout()).onErrorResume(throwable -> {
        state.transition(EndpointState.DISCONNECTED);
        if (disconnect.get()) {
            endpointContext.environment().eventBus().publish(new EndpointConnectionAbortedEvent(Duration.ofNanos(System.nanoTime() - attemptStart.get()), endpointContext, ConnectTimings.toMap(channel)));
            return Mono.empty();
        } else {
            return Mono.error(throwable);
        }
    }).retryWhen(Retry.any().exponentialBackoff(Duration.ofMillis(32), Duration.ofMillis(4096)).retryMax(Long.MAX_VALUE).doOnRetry(retryContext -> {
        Throwable ex = retryContext.exception();
        // We drop the severity for the BucketNotFoundException because it shows up when
        // bootstrapping against MDS clusters and nodes with no kv service enabled on it
        // that is bucket aware. If a bucket really does not exist we'll get an auth
        // exception instead.
        Event.Severity severity = ex instanceof BucketNotFoundException ? Event.Severity.DEBUG : Event.Severity.WARN;
        Duration duration = ex instanceof TimeoutException ? endpointContext.environment().timeoutConfig().connectTimeout() : Duration.ofNanos(System.nanoTime() - attemptStart.get());
        ex = annotateConnectException(ex);
        endpointContext.environment().eventBus().publish(new EndpointConnectionFailedEvent(severity, duration, endpointContext, retryContext.iteration(), trimNettyFromStackTrace(ex)));
    }).toReactorRetry()).subscribe(channel -> {
        long now = System.nanoTime();
        if (disconnect.get()) {
            this.channel = null;
            endpointContext.environment().eventBus().publish(new EndpointConnectionIgnoredEvent(Duration.ofNanos(now - attemptStart.get()), endpointContext, ConnectTimings.toMap(channel)));
            closeChannel(channel);
        } else {
            this.channel = channel;
            Optional<HostAndPort> localSocket = Optional.empty();
            if (channel.localAddress() instanceof InetSocketAddress) {
                // it will always be an inet socket address, but to safeguard for testing mocks...
                InetSocketAddress so = (InetSocketAddress) channel.localAddress();
                localSocket = Optional.of(new HostAndPort(so.getHostString(), so.getPort()));
            }
            EndpointContext newContext = new EndpointContext(endpointContext, endpointContext.remoteSocket(), endpointContext.circuitBreaker(), endpointContext.serviceType(), localSocket, endpointContext.bucket(), Optional.ofNullable(channel.attr(ChannelAttributes.CHANNEL_ID_KEY).get()));
            this.endpointContext.get().environment().eventBus().publish(new EndpointConnectedEvent(Duration.ofNanos(now - attemptStart.get()), newContext, ConnectTimings.toMap(channel)));
            this.endpointContext.set(newContext);
            this.circuitBreaker.reset();
            lastConnectedAt = now;
            state.transition(EndpointState.CONNECTED);
        }
    }, error -> endpointContext.environment().eventBus().publish(new UnexpectedEndpointConnectionFailedEvent(Duration.ofNanos(System.nanoTime() - attemptStart.get()), endpointContext, error)));
}
Also used : ChannelFutureListener(com.couchbase.client.core.deps.io.netty.channel.ChannelFutureListener) Arrays(java.util.Arrays) SocketAddress(java.net.SocketAddress) EndpointDisconnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointDisconnectionFailedEvent) TimeoutException(java.util.concurrent.TimeoutException) Request(com.couchbase.client.core.msg.Request) EndpointConnectionAbortedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionAbortedEvent) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceType(com.couchbase.client.core.service.ServiceType) Duration(java.time.Duration) Map(java.util.Map) Context(com.couchbase.client.core.cnc.Context) AbstractContext(com.couchbase.client.core.cnc.AbstractContext) SecurityConfig(com.couchbase.client.core.env.SecurityConfig) EndpointConnectedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectedEvent) UnexpectedEndpointDisconnectedEvent(com.couchbase.client.core.cnc.events.endpoint.UnexpectedEndpointDisconnectedEvent) EpollChannelOption(com.couchbase.client.core.deps.io.netty.channel.epoll.EpollChannelOption) Channel(com.couchbase.client.core.deps.io.netty.channel.Channel) BucketNotFoundException(com.couchbase.client.core.error.BucketNotFoundException) ChannelPipeline(com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline) EpollSocketChannel(com.couchbase.client.core.deps.io.netty.channel.epoll.EpollSocketChannel) RetryOrchestrator(com.couchbase.client.core.retry.RetryOrchestrator) SslHandlerFactory(com.couchbase.client.core.io.netty.SslHandlerFactory) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) InvalidArgumentException(com.couchbase.client.core.error.InvalidArgumentException) SignalType(reactor.core.publisher.SignalType) InetSocketAddress(java.net.InetSocketAddress) RetryReason(com.couchbase.client.core.retry.RetryReason) DefaultEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.DefaultEventLoopGroup) KQueueSocketChannel(com.couchbase.client.core.deps.io.netty.channel.kqueue.KQueueSocketChannel) ChannelAttributes(com.couchbase.client.core.io.netty.kv.ChannelAttributes) List(java.util.List) RedactableArgument.redactMeta(com.couchbase.client.core.logging.RedactableArgument.redactMeta) NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) ChannelFuture(com.couchbase.client.core.deps.io.netty.channel.ChannelFuture) SecurityException(com.couchbase.client.core.error.SecurityException) Optional(java.util.Optional) EpollEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.epoll.EpollEventLoopGroup) EndpointWriteFailedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointWriteFailedEvent) Response(com.couchbase.client.core.msg.Response) HostAndPort(com.couchbase.client.core.util.HostAndPort) Retry(com.couchbase.client.core.retry.reactor.Retry) TrafficCaptureHandler(com.couchbase.client.core.io.netty.TrafficCaptureHandler) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) CompletableFuture(java.util.concurrent.CompletableFuture) EndpointConnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionFailedEvent) AtomicReference(java.util.concurrent.atomic.AtomicReference) Supplier(java.util.function.Supplier) KQueueEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.kqueue.KQueueEventLoopGroup) PipelineErrorHandler(com.couchbase.client.core.io.netty.PipelineErrorHandler) SingleStateful(com.couchbase.client.core.util.SingleStateful) ConnectTimings(com.couchbase.client.core.io.netty.kv.ConnectTimings) LocalChannel(com.couchbase.client.core.deps.io.netty.channel.local.LocalChannel) Stability(com.couchbase.client.core.annotation.Stability) EndpointDiagnostics(com.couchbase.client.core.diagnostics.EndpointDiagnostics) ConnectException(java.net.ConnectException) UnexpectedEndpointConnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.UnexpectedEndpointConnectionFailedEvent) NioEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.nio.NioEventLoopGroup) CancellationReason(com.couchbase.client.core.msg.CancellationReason) LinkedList(java.util.LinkedList) ServiceContext(com.couchbase.client.core.service.ServiceContext) ChannelInitializer(com.couchbase.client.core.deps.io.netty.channel.ChannelInitializer) ChannelOption(com.couchbase.client.core.deps.io.netty.channel.ChannelOption) EndpointConnectionIgnoredEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionIgnoredEvent) Mono(reactor.core.publisher.Mono) Event(com.couchbase.client.core.cnc.Event) EndpointStateChangedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointStateChangedEvent) EventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup) TimeUnit(java.util.concurrent.TimeUnit) Flux(reactor.core.publisher.Flux) AtomicLong(java.util.concurrent.atomic.AtomicLong) EndpointDisconnectedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointDisconnectedEvent) Bootstrap(com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) InetSocketAddress(java.net.InetSocketAddress) DefaultEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.DefaultEventLoopGroup) EndpointConnectionIgnoredEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionIgnoredEvent) HostAndPort(com.couchbase.client.core.util.HostAndPort) EndpointConnectionAbortedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionAbortedEvent) SecurityConfig(com.couchbase.client.core.env.SecurityConfig) Bootstrap(com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap) ChannelInitializer(com.couchbase.client.core.deps.io.netty.channel.ChannelInitializer) TrafficCaptureHandler(com.couchbase.client.core.io.netty.TrafficCaptureHandler) TimeoutException(java.util.concurrent.TimeoutException) EndpointConnectedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectedEvent) Mono(reactor.core.publisher.Mono) Channel(com.couchbase.client.core.deps.io.netty.channel.Channel) EpollSocketChannel(com.couchbase.client.core.deps.io.netty.channel.epoll.EpollSocketChannel) KQueueSocketChannel(com.couchbase.client.core.deps.io.netty.channel.kqueue.KQueueSocketChannel) NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) LocalChannel(com.couchbase.client.core.deps.io.netty.channel.local.LocalChannel) SecurityException(com.couchbase.client.core.error.SecurityException) Duration(java.time.Duration) ChannelPipeline(com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline) TimeoutException(java.util.concurrent.TimeoutException) BucketNotFoundException(com.couchbase.client.core.error.BucketNotFoundException) InvalidArgumentException(com.couchbase.client.core.error.InvalidArgumentException) SecurityException(com.couchbase.client.core.error.SecurityException) ConnectException(java.net.ConnectException) AtomicLong(java.util.concurrent.atomic.AtomicLong) PipelineErrorHandler(com.couchbase.client.core.io.netty.PipelineErrorHandler) UnexpectedEndpointConnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.UnexpectedEndpointConnectionFailedEvent) EpollEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.epoll.EpollEventLoopGroup) BucketNotFoundException(com.couchbase.client.core.error.BucketNotFoundException) EndpointConnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionFailedEvent) UnexpectedEndpointConnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.UnexpectedEndpointConnectionFailedEvent)

Example 3 with Bootstrap

use of com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap in project couchbase-jvm-clients by couchbase.

the class KeyValueChannelIntegrationTest method assertAuthenticationFailure.

/**
 * Helper method to assert authentication failure in different scenarios.
 */
private void assertAuthenticationFailure(final Bootstrap bootstrap, final String msg) throws Exception {
    CountDownLatch latch = new CountDownLatch(1);
    bootstrap.connect().addListener((ChannelFutureListener) future -> {
        try {
            assertFalse(future.isSuccess());
            Throwable ex = future.cause();
            assertTrue(ex instanceof AuthenticationFailureException);
            assertEquals(msg, ex.getMessage());
        } finally {
            latch.countDown();
        }
    });
    latch.await();
}
Also used : ChannelFutureListener(com.couchbase.client.core.deps.io.netty.channel.ChannelFutureListener) KeyValueEndpoint(com.couchbase.client.core.endpoint.KeyValueEndpoint) AuthenticationFailureException(com.couchbase.client.core.error.AuthenticationFailureException) ClusterType(com.couchbase.client.test.ClusterType) NoopRequest(com.couchbase.client.core.msg.kv.NoopRequest) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) AfterAll(org.junit.jupiter.api.AfterAll) PasswordAuthenticator(com.couchbase.client.core.env.PasswordAuthenticator) SocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.SocketChannel) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) BeforeAll(org.junit.jupiter.api.BeforeAll) ServiceType(com.couchbase.client.core.service.ServiceType) Duration(java.time.Duration) EndpointContext(com.couchbase.client.core.endpoint.EndpointContext) NioEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.nio.NioEventLoopGroup) Channel(com.couchbase.client.core.deps.io.netty.channel.Channel) ChannelInitializer(com.couchbase.client.core.deps.io.netty.channel.ChannelInitializer) Assert.assertTrue(org.junit.Assert.assertTrue) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) IgnoreWhen(com.couchbase.client.test.IgnoreWhen) Services(com.couchbase.client.test.Services) Test(org.junit.jupiter.api.Test) TimeUnit(java.util.concurrent.TimeUnit) SimpleEventBus(com.couchbase.client.core.cnc.SimpleEventBus) CountDownLatch(java.util.concurrent.CountDownLatch) NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) NoopResponse(com.couchbase.client.core.msg.kv.NoopResponse) Optional(java.util.Optional) CollectionIdentifier(com.couchbase.client.core.io.CollectionIdentifier) Core(com.couchbase.client.core.Core) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) HostAndPort(com.couchbase.client.core.util.HostAndPort) Assert.assertEquals(org.junit.Assert.assertEquals) Bootstrap(com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap) AuthenticationFailureException(com.couchbase.client.core.error.AuthenticationFailureException) CountDownLatch(java.util.concurrent.CountDownLatch)

Example 4 with Bootstrap

use of com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap in project couchbase-jvm-clients by couchbase.

the class KeyValueChannelIntegrationTest method failWithInvalidUsernameCredential.

@Test
@IgnoreWhen(clusterTypes = ClusterType.MOCKED)
void failWithInvalidUsernameCredential() throws Exception {
    TestNodeConfig node = config().nodes().get(0);
    Bootstrap bootstrap = new Bootstrap().remoteAddress(node.hostname(), node.ports().get(Services.KV)).group(eventLoopGroup).channel(NioSocketChannel.class).handler(new ChannelInitializer<SocketChannel>() {

        @Override
        protected void initChannel(SocketChannel ch) {
            new KeyValueEndpoint.KeyValuePipelineInitializer(endpointContext, Optional.of(config().bucketname()), PasswordAuthenticator.create("vfwmf42343rew", config().adminPassword())).init(null, ch.pipeline());
        }
    });
    assertAuthenticationFailure(bootstrap, "Authentication Failure");
}
Also used : NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) SocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.SocketChannel) NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) Bootstrap(com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap) IgnoreWhen(com.couchbase.client.test.IgnoreWhen) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) Test(org.junit.jupiter.api.Test)

Example 5 with Bootstrap

use of com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap in project couchbase-jvm-clients by couchbase.

the class KeyValueChannelIntegrationTest method connectNoopAndDisconnect.

/**
 * This is the most simple kv test case one can do in a full-stack manner.
 *
 * <p>It connects to a kv socket, including all auth and bucket selection. It then
 * checks that the channel is opened properly and performs a NOOP and checks for a
 * successful result. Then it shuts everything down.</p>
 *
 * @throws Exception if waiting on the response fails.
 */
@Test
void connectNoopAndDisconnect() throws Exception {
    TestNodeConfig node = config().nodes().get(0);
    Bootstrap bootstrap = new Bootstrap().remoteAddress(node.hostname(), node.ports().get(Services.KV)).group(eventLoopGroup).channel(NioSocketChannel.class).handler(new ChannelInitializer<SocketChannel>() {

        @Override
        protected void initChannel(SocketChannel ch) {
            new KeyValueEndpoint.KeyValuePipelineInitializer(endpointContext, Optional.of(config().bucketname()), endpointContext.authenticator()).init(null, ch.pipeline());
        }
    });
    Channel channel = bootstrap.connect().awaitUninterruptibly().channel();
    assertTrue(channel.isActive());
    assertTrue(channel.isOpen());
    NoopRequest request = new NoopRequest(Duration.ZERO, endpointContext, null, CollectionIdentifier.fromDefault(config().bucketname()));
    channel.writeAndFlush(request);
    NoopResponse response = request.response().get(1, TimeUnit.SECONDS);
    assertTrue(response.status().success());
    channel.close().awaitUninterruptibly();
}
Also used : NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) NoopRequest(com.couchbase.client.core.msg.kv.NoopRequest) NoopResponse(com.couchbase.client.core.msg.kv.NoopResponse) SocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.SocketChannel) NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) SocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.SocketChannel) Channel(com.couchbase.client.core.deps.io.netty.channel.Channel) NioSocketChannel(com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel) Bootstrap(com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) Test(org.junit.jupiter.api.Test)

Aggregations

Bootstrap (com.couchbase.client.core.deps.io.netty.bootstrap.Bootstrap)7 NioSocketChannel (com.couchbase.client.core.deps.io.netty.channel.socket.nio.NioSocketChannel)6 Test (org.junit.jupiter.api.Test)6 SocketChannel (com.couchbase.client.core.deps.io.netty.channel.socket.SocketChannel)5 CoreIntegrationTest (com.couchbase.client.core.util.CoreIntegrationTest)5 TestNodeConfig (com.couchbase.client.test.TestNodeConfig)5 Channel (com.couchbase.client.core.deps.io.netty.channel.Channel)4 ChannelInitializer (com.couchbase.client.core.deps.io.netty.channel.ChannelInitializer)3 CoreEnvironment (com.couchbase.client.core.env.CoreEnvironment)3 ServiceType (com.couchbase.client.core.service.ServiceType)3 HostAndPort (com.couchbase.client.core.util.HostAndPort)3 IgnoreWhen (com.couchbase.client.test.IgnoreWhen)3 Duration (java.time.Duration)3 Optional (java.util.Optional)3 TimeUnit (java.util.concurrent.TimeUnit)3 Core (com.couchbase.client.core.Core)2 ChannelFutureListener (com.couchbase.client.core.deps.io.netty.channel.ChannelFutureListener)2 DefaultEventLoopGroup (com.couchbase.client.core.deps.io.netty.channel.DefaultEventLoopGroup)2 EventLoopGroup (com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup)2 LocalChannel (com.couchbase.client.core.deps.io.netty.channel.local.LocalChannel)2