Search in sources :

Example 11 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class Core method reconfigureBuckets.

/**
 * Contains logic to perform reconfiguration for a bucket config.
 *
 * @param bucketConfigs the flux of bucket configs currently open.
 * @return a mono once reconfiguration for all buckets is complete
 */
private Mono<Void> reconfigureBuckets(final Flux<BucketConfig> bucketConfigs) {
    return bucketConfigs.flatMap(bc -> Flux.fromIterable(bc.nodes()).flatMap(ni -> {
        boolean tls = coreContext.environment().securityConfig().tlsEnabled();
        Set<Map.Entry<ServiceType, Integer>> aServices = null;
        Optional<String> alternateAddress = coreContext.alternateAddress();
        String aHost = null;
        if (alternateAddress.isPresent()) {
            AlternateAddress aa = ni.alternateAddresses().get(alternateAddress.get());
            aHost = aa.hostname();
            aServices = tls ? aa.sslServices().entrySet() : aa.services().entrySet();
        }
        if (isNullOrEmpty(aServices)) {
            aServices = tls ? ni.sslServices().entrySet() : ni.services().entrySet();
        }
        final String alternateHost = aHost;
        final Set<Map.Entry<ServiceType, Integer>> services = aServices;
        Flux<Void> serviceRemoveFlux = Flux.fromIterable(Arrays.asList(ServiceType.values())).filter(s -> {
            for (Map.Entry<ServiceType, Integer> inConfig : services) {
                if (inConfig.getKey() == s) {
                    return false;
                }
            }
            return true;
        }).flatMap(s -> removeServiceFrom(ni.identifier(), s, s.scope() == ServiceScope.BUCKET ? Optional.of(bc.name()) : Optional.empty()).onErrorResume(throwable -> {
            eventBus.publish(new ServiceReconfigurationFailedEvent(coreContext, ni.hostname(), s, throwable));
            return Mono.empty();
        }));
        Flux<Void> serviceAddFlux = Flux.fromIterable(services).flatMap(s -> ensureServiceAt(ni.identifier(), s.getKey(), s.getValue(), s.getKey().scope() == ServiceScope.BUCKET ? Optional.of(bc.name()) : Optional.empty(), Optional.ofNullable(alternateHost)).onErrorResume(throwable -> {
            eventBus.publish(new ServiceReconfigurationFailedEvent(coreContext, ni.hostname(), s.getKey(), throwable));
            return Mono.empty();
        }));
        return Flux.merge(serviceAddFlux, serviceRemoveFlux);
    })).then();
}
Also used : InitGlobalConfigFailedEvent(com.couchbase.client.core.cnc.events.core.InitGlobalConfigFailedEvent) CbCollections.isNullOrEmpty(com.couchbase.client.core.util.CbCollections.isNullOrEmpty) Arrays(java.util.Arrays) RequestTarget(com.couchbase.client.core.msg.RequestTarget) WatchdogInvalidStateIdentifiedEvent(com.couchbase.client.core.cnc.events.core.WatchdogInvalidStateIdentifiedEvent) Request(com.couchbase.client.core.msg.Request) SecureRandom(java.security.SecureRandom) EventBus(com.couchbase.client.core.cnc.EventBus) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) KeyValueLocator(com.couchbase.client.core.node.KeyValueLocator) ServiceType(com.couchbase.client.core.service.ServiceType) Duration(java.time.Duration) Map(java.util.Map) CoreCreatedEvent(com.couchbase.client.core.cnc.events.core.CoreCreatedEvent) Locator(com.couchbase.client.core.node.Locator) BucketConfig(com.couchbase.client.core.config.BucketConfig) ReconfigurationIgnoredEvent(com.couchbase.client.core.cnc.events.core.ReconfigurationIgnoredEvent) ShutdownCompletedEvent(com.couchbase.client.core.cnc.events.core.ShutdownCompletedEvent) BucketOpenedEvent(com.couchbase.client.core.cnc.events.core.BucketOpenedEvent) CoreHttpClient(com.couchbase.client.core.endpoint.http.CoreHttpClient) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) GlobalConfigNotFoundException(com.couchbase.client.core.error.GlobalConfigNotFoundException) Set(java.util.Set) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) InvalidArgumentException(com.couchbase.client.core.error.InvalidArgumentException) BucketOpenFailedEvent(com.couchbase.client.core.cnc.events.core.BucketOpenFailedEvent) Collectors(java.util.stream.Collectors) RoundRobinLocator(com.couchbase.client.core.node.RoundRobinLocator) Objects(java.util.Objects) ValueRecorder(com.couchbase.client.core.cnc.ValueRecorder) List(java.util.List) Stream(java.util.stream.Stream) BucketClosedEvent(com.couchbase.client.core.cnc.events.core.BucketClosedEvent) Optional(java.util.Optional) ShutdownInitiatedEvent(com.couchbase.client.core.cnc.events.core.ShutdownInitiatedEvent) Response(com.couchbase.client.core.msg.Response) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ClusterConfig(com.couchbase.client.core.config.ClusterConfig) UnsupportedConfigMechanismException(com.couchbase.client.core.error.UnsupportedConfigMechanismException) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) Disposable(reactor.core.Disposable) GlobalConfig(com.couchbase.client.core.config.GlobalConfig) AnalyticsLocator(com.couchbase.client.core.node.AnalyticsLocator) ViewLocator(com.couchbase.client.core.node.ViewLocator) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) AlternateAddress(com.couchbase.client.core.config.AlternateAddress) HashMap(java.util.HashMap) SeedNode(com.couchbase.client.core.env.SeedNode) BeforeSendRequestCallback(com.couchbase.client.core.callbacks.BeforeSendRequestCallback) ReconfigurationCompletedEvent(com.couchbase.client.core.cnc.events.core.ReconfigurationCompletedEvent) ArrayList(java.util.ArrayList) ServiceState(com.couchbase.client.core.service.ServiceState) TracingIdentifiers(com.couchbase.client.core.cnc.TracingIdentifiers) Stability(com.couchbase.client.core.annotation.Stability) BucketOpenInitiatedEvent(com.couchbase.client.core.cnc.events.core.BucketOpenInitiatedEvent) RequestContext(com.couchbase.client.core.msg.RequestContext) ConfigException(com.couchbase.client.core.error.ConfigException) EndpointDiagnostics(com.couchbase.client.core.diagnostics.EndpointDiagnostics) RequestCanceledException(com.couchbase.client.core.error.RequestCanceledException) CancellationReason(com.couchbase.client.core.msg.CancellationReason) ServiceReconfigurationFailedEvent(com.couchbase.client.core.cnc.events.core.ServiceReconfigurationFailedEvent) ConfigurationProvider(com.couchbase.client.core.config.ConfigurationProvider) ReconfigurationErrorDetectedEvent(com.couchbase.client.core.cnc.events.core.ReconfigurationErrorDetectedEvent) ServiceScope(com.couchbase.client.core.service.ServiceScope) Mono(reactor.core.publisher.Mono) Event(com.couchbase.client.core.cnc.Event) WatchdogRunFailedEvent(com.couchbase.client.core.cnc.events.core.WatchdogRunFailedEvent) TimeUnit(java.util.concurrent.TimeUnit) Flux(reactor.core.publisher.Flux) Node(com.couchbase.client.core.node.Node) AlreadyShutdownException(com.couchbase.client.core.error.AlreadyShutdownException) Authenticator(com.couchbase.client.core.env.Authenticator) DefaultConfigurationProvider(com.couchbase.client.core.config.DefaultConfigurationProvider) AlternateAddress(com.couchbase.client.core.config.AlternateAddress) ServiceReconfigurationFailedEvent(com.couchbase.client.core.cnc.events.core.ServiceReconfigurationFailedEvent)

Example 12 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class Core method reconfigure.

/**
 * Reconfigures the SDK topology to align with the current server configuration.
 *
 * <p>When reconfigure is called, it will grab a current configuration and then add/remove
 * nodes/services to mirror the current topology and configuration settings.</p>
 *
 * <p>This is a eventually consistent process, so in-flight operations might still be rescheduled
 * and then picked up later (or cancelled, depending on the strategy). For those coming from 1.x,
 * it works very similar.</p>
 */
private void reconfigure() {
    if (reconfigureInProgress.compareAndSet(false, true)) {
        final ClusterConfig configForThisAttempt = currentConfig;
        if (configForThisAttempt.bucketConfigs().isEmpty() && configForThisAttempt.globalConfig() == null) {
            reconfigureDisconnectAll();
            return;
        }
        final long start = System.nanoTime();
        Flux<BucketConfig> bucketConfigFlux = Flux.just(configForThisAttempt).flatMap(cc -> Flux.fromIterable(cc.bucketConfigs().values()));
        reconfigureBuckets(bucketConfigFlux).then(reconfigureGlobal(configForThisAttempt.globalConfig())).then(Mono.defer(() -> Flux.fromIterable(new ArrayList<>(nodes)).flatMap(n -> maybeRemoveNode(n, configForThisAttempt)).then())).subscribe(v -> {
        }, e -> {
            clearReconfigureInProgress();
            eventBus.publish(new ReconfigurationErrorDetectedEvent(context(), e));
        }, () -> {
            clearReconfigureInProgress();
            eventBus.publish(new ReconfigurationCompletedEvent(Duration.ofNanos(System.nanoTime() - start), coreContext));
        });
    } else {
        moreConfigsPending.set(true);
        eventBus.publish(new ReconfigurationIgnoredEvent(coreContext));
    }
}
Also used : ReconfigurationIgnoredEvent(com.couchbase.client.core.cnc.events.core.ReconfigurationIgnoredEvent) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) ReconfigurationErrorDetectedEvent(com.couchbase.client.core.cnc.events.core.ReconfigurationErrorDetectedEvent) ReconfigurationCompletedEvent(com.couchbase.client.core.cnc.events.core.ReconfigurationCompletedEvent) BucketConfig(com.couchbase.client.core.config.BucketConfig) ClusterConfig(com.couchbase.client.core.config.ClusterConfig)

Example 13 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class ClusterManagerBucketLoaderIntegrationTest method loadConfigViaClusterManagerHttp.

/**
 * This is a very simplistic test that makes sure that we can "round trip" in the
 * {@link ClusterManagerBucketLoader} by grabbing a JSON decodable config through the full stack.
 */
@Test
// @Disabled
void loadConfigViaClusterManagerHttp() {
    TestNodeConfig config = config().firstNodeWith(Services.MANAGER).get();
    Core core = Core.create(env, authenticator(), seedNodes());
    ClusterManagerBucketLoader loader = new ClusterManagerBucketLoader(core);
    int port = config.ports().get(Services.MANAGER);
    ProposedBucketConfigContext ctx = loader.load(new NodeIdentifier(config.hostname(), port), port, config().bucketname(), Optional.empty()).block();
    BucketConfig loaded = BucketConfigParser.parse(ctx.config(), env, ctx.origin());
    assertNotNull(loaded);
    assertEquals(config().bucketname(), loaded.name());
    core.shutdown().block();
}
Also used : TestNodeConfig(com.couchbase.client.test.TestNodeConfig) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) ProposedBucketConfigContext(com.couchbase.client.core.config.ProposedBucketConfigContext) BucketConfig(com.couchbase.client.core.config.BucketConfig) Core(com.couchbase.client.core.Core) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) Test(org.junit.jupiter.api.Test)

Example 14 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class ReactiveBatchHelper method existsBytes.

/**
 * Performs the bulk logic of fetching a config and splitting up the observe requests.
 *
 * @param collection the collection on which the query should be performed.
 * @param ids the list of ids which should be checked.
 * @return a flux of all
 */
private static Flux<byte[]> existsBytes(final Collection collection, final java.util.Collection<String> ids) {
    final Core core = collection.core();
    final CoreEnvironment env = core.context().environment();
    BucketConfig config = core.clusterConfig().bucketConfig(collection.bucketName());
    if (core.configurationProvider().bucketConfigLoadInProgress() || config == null) {
        // and then try again. In a steady state this should not happen.
        return Mono.delay(Duration.ofMillis(100), env.scheduler()).flatMapMany(ign -> existsBytes(collection, ids));
    }
    long start = System.nanoTime();
    if (!(config instanceof CouchbaseBucketConfig)) {
        throw new IllegalStateException("Only couchbase (and ephemeral) buckets are supported at this point!");
    }
    Map<NodeIdentifier, Map<byte[], Short>> nodeEntries = new HashMap<>(config.nodes().size());
    for (NodeInfo node : config.nodes()) {
        nodeEntries.put(node.identifier(), new HashMap<>(ids.size() / config.nodes().size()));
    }
    CouchbaseBucketConfig cbc = (CouchbaseBucketConfig) config;
    CollectionIdentifier ci = new CollectionIdentifier(collection.bucketName(), Optional.of(collection.scopeName()), Optional.of(collection.name()));
    for (String id : ids) {
        byte[] encodedId = id.getBytes(StandardCharsets.UTF_8);
        int partitionId = KeyValueLocator.partitionForKey(encodedId, cbc.numberOfPartitions());
        int nodeId = cbc.nodeIndexForActive(partitionId, false);
        NodeInfo nodeInfo = cbc.nodeAtIndex(nodeId);
        nodeEntries.get(nodeInfo.identifier()).put(encodedId, (short) partitionId);
    }
    List<Mono<MultiObserveViaCasResponse>> responses = new ArrayList<>(nodeEntries.size());
    List<MultiObserveViaCasRequest> requests = new ArrayList<>(nodeEntries.size());
    for (Map.Entry<NodeIdentifier, Map<byte[], Short>> node : nodeEntries.entrySet()) {
        if (node.getValue().isEmpty()) {
            // service enabled and 2) have keys that we need to fetch
            continue;
        }
        MultiObserveViaCasRequest request = new MultiObserveViaCasRequest(env.timeoutConfig().kvTimeout(), core.context(), env.retryStrategy(), ci, node.getKey(), node.getValue(), PMGET_PREDICATE);
        core.send(request);
        requests.add(request);
        responses.add(Reactor.wrap(request, request.response(), true));
    }
    return Flux.merge(responses).flatMap(response -> Flux.fromIterable(response.observed().keySet())).onErrorMap(throwable -> {
        BatchErrorContext ctx = new BatchErrorContext(Collections.unmodifiableList(requests));
        return new BatchHelperFailureException("Failed to perform BatchHelper bulk operation", throwable, ctx);
    }).doOnComplete(() -> core.context().environment().eventBus().publish(new BatchHelperExistsCompletedEvent(Duration.ofNanos(System.nanoTime() - start), new BatchErrorContext(Collections.unmodifiableList(requests)))));
}
Also used : GetResult(com.couchbase.client.java.kv.GetResult) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) Tuples(reactor.util.function.Tuples) Tuple2(reactor.util.function.Tuple2) HashMap(java.util.HashMap) CouchbaseBucketConfig(com.couchbase.client.core.config.CouchbaseBucketConfig) ArrayList(java.util.ArrayList) Collection(com.couchbase.client.java.Collection) KeyValueLocator(com.couchbase.client.core.node.KeyValueLocator) Duration(java.time.Duration) Map(java.util.Map) Stability(com.couchbase.client.core.annotation.Stability) BucketConfig(com.couchbase.client.core.config.BucketConfig) Reactor(com.couchbase.client.core.Reactor) Predicate(java.util.function.Predicate) NodeInfo(com.couchbase.client.core.config.NodeInfo) ObserveViaCasResponse(com.couchbase.client.core.msg.kv.ObserveViaCasResponse) MultiObserveViaCasRequest(com.couchbase.client.core.msg.kv.MultiObserveViaCasRequest) Mono(reactor.core.publisher.Mono) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) StandardCharsets(java.nio.charset.StandardCharsets) MultiObserveViaCasResponse(com.couchbase.client.core.msg.kv.MultiObserveViaCasResponse) Flux(reactor.core.publisher.Flux) List(java.util.List) Optional(java.util.Optional) CollectionIdentifier(com.couchbase.client.core.io.CollectionIdentifier) BatchHelperExistsCompletedEvent(com.couchbase.client.java.cnc.evnts.BatchHelperExistsCompletedEvent) Core(com.couchbase.client.core.Core) Collections(java.util.Collections) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) MultiObserveViaCasRequest(com.couchbase.client.core.msg.kv.MultiObserveViaCasRequest) CouchbaseBucketConfig(com.couchbase.client.core.config.CouchbaseBucketConfig) BucketConfig(com.couchbase.client.core.config.BucketConfig) Core(com.couchbase.client.core.Core) CouchbaseBucketConfig(com.couchbase.client.core.config.CouchbaseBucketConfig) Mono(reactor.core.publisher.Mono) NodeInfo(com.couchbase.client.core.config.NodeInfo) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) BatchHelperExistsCompletedEvent(com.couchbase.client.java.cnc.evnts.BatchHelperExistsCompletedEvent) HashMap(java.util.HashMap) Map(java.util.Map) CollectionIdentifier(com.couchbase.client.core.io.CollectionIdentifier)

Example 15 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class ReplicaHelper method getAllReplicasRequests.

/**
 * Helper method to assemble a stream of requests to the active and all replicas
 *
 * @param core the core to execute the request
 * @param collectionIdentifier the collection containing the document
 * @param documentId the ID of the document
 * @param clientContext (nullable) client context info
 * @param retryStrategy the retry strategy to use
 * @param timeout the timeout until we need to stop the get all replicas
 * @param parent the "get all/any replicas" request span
 * @return a stream of requests.
 */
public static CompletableFuture<Stream<GetRequest>> getAllReplicasRequests(final Core core, final CollectionIdentifier collectionIdentifier, final String documentId, final Map<String, Object> clientContext, final RetryStrategy retryStrategy, final Duration timeout, final RequestSpan parent) {
    notNullOrEmpty(documentId, "Id");
    final CoreContext coreContext = core.context();
    final CoreEnvironment environment = coreContext.environment();
    final BucketConfig config = core.clusterConfig().bucketConfig(collectionIdentifier.bucket());
    if (config instanceof CouchbaseBucketConfig) {
        int numReplicas = ((CouchbaseBucketConfig) config).numberOfReplicas();
        List<GetRequest> requests = new ArrayList<>(numReplicas + 1);
        RequestSpan span = environment.requestTracer().requestSpan(TracingIdentifiers.SPAN_REQUEST_KV_GET, parent);
        GetRequest activeRequest = new GetRequest(documentId, timeout, coreContext, collectionIdentifier, retryStrategy, span);
        activeRequest.context().clientContext(clientContext);
        requests.add(activeRequest);
        for (short replica = 1; replica <= numReplicas; replica++) {
            RequestSpan replicaSpan = environment.requestTracer().requestSpan(TracingIdentifiers.SPAN_REQUEST_KV_GET_REPLICA, parent);
            ReplicaGetRequest replicaRequest = new ReplicaGetRequest(documentId, timeout, coreContext, collectionIdentifier, retryStrategy, replica, replicaSpan);
            replicaRequest.context().clientContext(clientContext);
            requests.add(replicaRequest);
        }
        return CompletableFuture.completedFuture(requests.stream());
    } else if (config == null) {
        // no bucket config found, it might be in-flight being opened so we need to reschedule the operation until
        // the timeout fires!
        final Duration retryDelay = Duration.ofMillis(100);
        final CompletableFuture<Stream<GetRequest>> future = new CompletableFuture<>();
        coreContext.environment().timer().schedule(() -> {
            getAllReplicasRequests(core, collectionIdentifier, documentId, clientContext, retryStrategy, timeout.minus(retryDelay), parent).whenComplete((getRequestStream, throwable) -> {
                if (throwable != null) {
                    future.completeExceptionally(throwable);
                } else {
                    future.complete(getRequestStream);
                }
            });
        }, retryDelay);
        return future;
    } else {
        final CompletableFuture<Stream<GetRequest>> future = new CompletableFuture<>();
        future.completeExceptionally(CommonExceptions.getFromReplicaNotCouchbaseBucket());
        return future;
    }
}
Also used : CouchbaseException(com.couchbase.client.core.error.CouchbaseException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) CompletableFuture(java.util.concurrent.CompletableFuture) Function(java.util.function.Function) CouchbaseBucketConfig(com.couchbase.client.core.config.CouchbaseBucketConfig) ArrayList(java.util.ArrayList) DefaultErrorUtil.keyValueStatusToException(com.couchbase.client.core.error.DefaultErrorUtil.keyValueStatusToException) TracingIdentifiers(com.couchbase.client.core.cnc.TracingIdentifiers) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) DocumentUnretrievableException(com.couchbase.client.core.error.DocumentUnretrievableException) CoreContext(com.couchbase.client.core.CoreContext) Duration(java.time.Duration) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) Stability(com.couchbase.client.core.annotation.Stability) RequestSpan(com.couchbase.client.core.cnc.RequestSpan) GetResponse(com.couchbase.client.core.msg.kv.GetResponse) IndividualReplicaGetFailedEvent(com.couchbase.client.core.cnc.events.request.IndividualReplicaGetFailedEvent) BucketConfig(com.couchbase.client.core.config.BucketConfig) Reactor(com.couchbase.client.core.Reactor) CommonExceptions(com.couchbase.client.core.error.CommonExceptions) Mono(reactor.core.publisher.Mono) CompletionException(java.util.concurrent.CompletionException) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) Collectors(java.util.stream.Collectors) Validators.notNullOrEmpty(com.couchbase.client.core.util.Validators.notNullOrEmpty) Flux(reactor.core.publisher.Flux) List(java.util.List) Stream(java.util.stream.Stream) GetRequest(com.couchbase.client.core.msg.kv.GetRequest) ReplicaGetRequest(com.couchbase.client.core.msg.kv.ReplicaGetRequest) ErrorContext(com.couchbase.client.core.error.context.ErrorContext) CollectionIdentifier(com.couchbase.client.core.io.CollectionIdentifier) RetryStrategy(com.couchbase.client.core.retry.RetryStrategy) Core(com.couchbase.client.core.Core) ReducedKeyValueErrorContext(com.couchbase.client.core.error.context.ReducedKeyValueErrorContext) Collections(java.util.Collections) AggregateErrorContext(com.couchbase.client.core.error.context.AggregateErrorContext) CoreContext(com.couchbase.client.core.CoreContext) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) CouchbaseBucketConfig(com.couchbase.client.core.config.CouchbaseBucketConfig) ArrayList(java.util.ArrayList) Duration(java.time.Duration) CouchbaseBucketConfig(com.couchbase.client.core.config.CouchbaseBucketConfig) BucketConfig(com.couchbase.client.core.config.BucketConfig) RequestSpan(com.couchbase.client.core.cnc.RequestSpan) CompletableFuture(java.util.concurrent.CompletableFuture) GetRequest(com.couchbase.client.core.msg.kv.GetRequest) ReplicaGetRequest(com.couchbase.client.core.msg.kv.ReplicaGetRequest) ReplicaGetRequest(com.couchbase.client.core.msg.kv.ReplicaGetRequest)

Aggregations

BucketConfig (com.couchbase.client.core.config.BucketConfig)20 Optional (java.util.Optional)12 ServiceType (com.couchbase.client.core.service.ServiceType)10 NodeIdentifier (com.couchbase.client.core.node.NodeIdentifier)9 HashMap (java.util.HashMap)9 SeedNode (com.couchbase.client.core.env.SeedNode)8 Duration (java.time.Duration)8 ClusterConfig (com.couchbase.client.core.config.ClusterConfig)7 ConfigurationProvider (com.couchbase.client.core.config.ConfigurationProvider)7 ArrayList (java.util.ArrayList)7 Map (java.util.Map)7 Test (org.junit.jupiter.api.Test)7 Core (com.couchbase.client.core.Core)6 Stability (com.couchbase.client.core.annotation.Stability)6 CouchbaseBucketConfig (com.couchbase.client.core.config.CouchbaseBucketConfig)6 Node (com.couchbase.client.core.node.Node)6 List (java.util.List)5 Flux (reactor.core.publisher.Flux)5 Reactor (com.couchbase.client.core.Reactor)4 EventBus (com.couchbase.client.core.cnc.EventBus)4