Search in sources :

Example 1 with ConfigException

use of com.couchbase.client.core.error.ConfigException in project couchbase-jvm-clients by couchbase.

the class DefaultConfigurationProvider method loadAndRefreshGlobalConfig.

@Override
public Mono<Void> loadAndRefreshGlobalConfig() {
    return Mono.defer(() -> {
        if (!shutdown.get()) {
            globalConfigLoadInProgress = true;
            boolean tls = core.context().environment().securityConfig().tlsEnabled();
            int kvPort = tls ? DEFAULT_KV_TLS_PORT : DEFAULT_KV_PORT;
            final AtomicBoolean hasErrored = new AtomicBoolean();
            return Flux.range(1, Math.min(MAX_PARALLEL_LOADERS, currentSeedNodes().size())).flatMap(index -> Flux.fromIterable(currentSeedNodes()).take(Math.min(index, currentSeedNodes().size())).last().flatMap(seed -> {
                long start = System.nanoTime();
                if (!currentSeedNodes().contains(seed)) {
                    // node we are about to load is still part of the list.
                    return Mono.empty();
                }
                NodeIdentifier identifier = new NodeIdentifier(seed.address(), seed.clusterManagerPort().orElse(DEFAULT_MANAGER_PORT));
                return globalLoader.load(identifier, seed.kvPort().orElse(kvPort)).doOnError(throwable -> core.context().environment().eventBus().publish(new IndividualGlobalConfigLoadFailedEvent(Duration.ofNanos(System.nanoTime() - start), core.context(), throwable, seed.address())));
            }).retryWhen(Retry.from(companion -> companion.flatMap(rs -> {
                Throwable f = rs.failure();
                if (shutdown.get()) {
                    return Mono.error(new AlreadyShutdownException());
                }
                if (f instanceof UnsupportedConfigMechanismException) {
                    return Mono.error(Exceptions.propagate(f));
                }
                Duration delay = Duration.ofMillis(1);
                eventBus.publish(new GlobalConfigRetriedEvent(delay, core.context(), f));
                return Mono.just(rs.totalRetries()).delayElement(delay, core.context().environment().scheduler());
            }))).onErrorResume(throwable -> {
                if (hasErrored.compareAndSet(false, true)) {
                    return Mono.error(throwable);
                }
                return Mono.empty();
            })).take(1).switchIfEmpty(Mono.error(new ConfigException("Could not locate a single global configuration"))).map(ctx -> {
                proposeGlobalConfig(ctx);
                return ctx;
            }).then(globalRefresher.start()).doOnTerminate(() -> globalConfigLoadInProgress = false);
        } else {
            return Mono.error(new AlreadyShutdownException());
        }
    });
}
Also used : KeyValueBucketRefresher(com.couchbase.client.core.config.refresher.KeyValueBucketRefresher) Retry(reactor.util.retry.Retry) UnsignedLEB128(com.couchbase.client.core.util.UnsignedLEB128) BucketConfigUpdatedEvent(com.couchbase.client.core.cnc.events.config.BucketConfigUpdatedEvent) ClusterManagerBucketLoader(com.couchbase.client.core.config.loader.ClusterManagerBucketLoader) BestEffortRetryStrategy(com.couchbase.client.core.retry.BestEffortRetryStrategy) JsonNode(com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode) EventBus(com.couchbase.client.core.cnc.EventBus) NetworkResolution(com.couchbase.client.core.env.NetworkResolution) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceType(com.couchbase.client.core.service.ServiceType) Duration(java.time.Duration) Map(java.util.Map) GlobalConfigRetriedEvent(com.couchbase.client.core.cnc.events.config.GlobalConfigRetriedEvent) GlobalConfigUpdatedEvent(com.couchbase.client.core.cnc.events.config.GlobalConfigUpdatedEvent) CollectionMapRefreshFailedEvent(com.couchbase.client.core.cnc.events.config.CollectionMapRefreshFailedEvent) Mapper(com.couchbase.client.core.json.Mapper) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) BucketNotFoundDuringLoadException(com.couchbase.client.core.error.BucketNotFoundDuringLoadException) Collectors(java.util.stream.Collectors) ResponseStatus(com.couchbase.client.core.msg.ResponseStatus) Objects(java.util.Objects) List(java.util.List) Stream(java.util.stream.Stream) BucketOpenRetriedEvent(com.couchbase.client.core.cnc.events.config.BucketOpenRetriedEvent) ConfigIgnoredEvent(com.couchbase.client.core.cnc.events.config.ConfigIgnoredEvent) SeedNodesUpdatedEvent(com.couchbase.client.core.cnc.events.config.SeedNodesUpdatedEvent) Optional(java.util.Optional) ClusterManagerBucketRefresher(com.couchbase.client.core.config.refresher.ClusterManagerBucketRefresher) Exceptions(reactor.core.Exceptions) GlobalRefresher(com.couchbase.client.core.config.refresher.GlobalRefresher) UnsupportedConfigMechanismException(com.couchbase.client.core.error.UnsupportedConfigMechanismException) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) FluxSink(reactor.core.publisher.FluxSink) CouchbaseException(com.couchbase.client.core.error.CouchbaseException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) SeedNode(com.couchbase.client.core.env.SeedNode) AtomicReference(java.util.concurrent.atomic.AtomicReference) IndividualGlobalConfigLoadFailedEvent(com.couchbase.client.core.cnc.events.config.IndividualGlobalConfigLoadFailedEvent) ConfigException(com.couchbase.client.core.error.ConfigException) CollectionMapRefreshIgnoredEvent(com.couchbase.client.core.cnc.events.config.CollectionMapRefreshIgnoredEvent) RequestCanceledException(com.couchbase.client.core.error.RequestCanceledException) CancellationReason(com.couchbase.client.core.msg.CancellationReason) CbCollections.copyToUnmodifiableSet(com.couchbase.client.core.util.CbCollections.copyToUnmodifiableSet) BucketNotReadyDuringLoadException(com.couchbase.client.core.error.BucketNotReadyDuringLoadException) GlobalLoader(com.couchbase.client.core.config.loader.GlobalLoader) Mono(reactor.core.publisher.Mono) KeyValueBucketLoader(com.couchbase.client.core.config.loader.KeyValueBucketLoader) GetCollectionIdRequest(com.couchbase.client.core.msg.kv.GetCollectionIdRequest) ReplayProcessor(reactor.core.publisher.ReplayProcessor) Flux(reactor.core.publisher.Flux) SeedNodeOutdatedException(com.couchbase.client.core.error.SeedNodeOutdatedException) CollectionMap(com.couchbase.client.core.io.CollectionMap) Collections.unmodifiableSet(java.util.Collections.unmodifiableSet) AlreadyShutdownException(com.couchbase.client.core.error.AlreadyShutdownException) CollectionIdentifier(com.couchbase.client.core.io.CollectionIdentifier) Core(com.couchbase.client.core.Core) CollectionMapRefreshSucceededEvent(com.couchbase.client.core.cnc.events.config.CollectionMapRefreshSucceededEvent) Duration(java.time.Duration) ConfigException(com.couchbase.client.core.error.ConfigException) IndividualGlobalConfigLoadFailedEvent(com.couchbase.client.core.cnc.events.config.IndividualGlobalConfigLoadFailedEvent) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) GlobalConfigRetriedEvent(com.couchbase.client.core.cnc.events.config.GlobalConfigRetriedEvent) AlreadyShutdownException(com.couchbase.client.core.error.AlreadyShutdownException) UnsupportedConfigMechanismException(com.couchbase.client.core.error.UnsupportedConfigMechanismException)

Example 2 with ConfigException

use of com.couchbase.client.core.error.ConfigException in project couchbase-jvm-clients by couchbase.

the class Core method initGlobalConfig.

/**
 * Instructs the client to, if possible, load and initialize the global config.
 *
 * <p>Since global configs are an "optional" feature depending on the cluster version, if an error happens
 * this method will not fail. Rather it will log the exception (with some logic dependent on the type of error)
 * and will allow the higher level components to move on where possible.</p>
 */
@Stability.Internal
public void initGlobalConfig() {
    long start = System.nanoTime();
    configurationProvider.loadAndRefreshGlobalConfig().subscribe(v -> {
    }, throwable -> {
        InitGlobalConfigFailedEvent.Reason reason = InitGlobalConfigFailedEvent.Reason.UNKNOWN;
        if (throwable instanceof UnsupportedConfigMechanismException) {
            reason = InitGlobalConfigFailedEvent.Reason.UNSUPPORTED;
        } else if (throwable instanceof GlobalConfigNotFoundException) {
            reason = InitGlobalConfigFailedEvent.Reason.NO_CONFIG_FOUND;
        } else if (throwable instanceof ConfigException) {
            if (throwable.getCause() instanceof RequestCanceledException) {
                RequestContext ctx = ((RequestCanceledException) throwable.getCause()).context().requestContext();
                if (ctx.request().cancellationReason() == CancellationReason.SHUTDOWN) {
                    reason = InitGlobalConfigFailedEvent.Reason.SHUTDOWN;
                }
            } else if (throwable.getMessage().contains("NO_ACCESS")) {
                reason = InitGlobalConfigFailedEvent.Reason.NO_ACCESS;
            }
        } else if (throwable instanceof AlreadyShutdownException) {
            reason = InitGlobalConfigFailedEvent.Reason.SHUTDOWN;
        }
        eventBus.publish(new InitGlobalConfigFailedEvent(reason.severity(), Duration.ofNanos(System.nanoTime() - start), context(), reason, throwable));
    });
}
Also used : RequestCanceledException(com.couchbase.client.core.error.RequestCanceledException) InitGlobalConfigFailedEvent(com.couchbase.client.core.cnc.events.core.InitGlobalConfigFailedEvent) GlobalConfigNotFoundException(com.couchbase.client.core.error.GlobalConfigNotFoundException) ConfigException(com.couchbase.client.core.error.ConfigException) RequestContext(com.couchbase.client.core.msg.RequestContext) AlreadyShutdownException(com.couchbase.client.core.error.AlreadyShutdownException) UnsupportedConfigMechanismException(com.couchbase.client.core.error.UnsupportedConfigMechanismException)

Example 3 with ConfigException

use of com.couchbase.client.core.error.ConfigException in project couchbase-jvm-clients by couchbase.

the class DefaultConfigurationProviderIntegrationTest method retriesOnBucketNotFoundDuringLoadException.

/**
 * Need to make sure that if a bucket is not found during load, we continue retrying the open
 * bucket attempts.
 */
@Test
@IgnoreWhen(clusterTypes = ClusterType.CAVES)
void retriesOnBucketNotFoundDuringLoadException() {
    TestNodeConfig cfg = config().firstNodeWith(Services.KV).get();
    Set<SeedNode> seeds = new HashSet<>(Collections.singletonList(SeedNode.create(cfg.hostname(), Optional.of(cfg.ports().get(Services.KV)), Optional.of(cfg.ports().get(Services.MANAGER)))));
    SimpleEventBus eventBus = new SimpleEventBus(true);
    environment = CoreEnvironment.builder().eventBus(eventBus).build();
    core = Core.create(environment, authenticator(), seeds);
    ConfigurationProvider provider = new DefaultConfigurationProvider(core, seeds);
    try {
        String bucketName = "this-bucket-does-not-exist";
        provider.openBucket(bucketName).subscribe(v -> {
        }, e -> assertTrue(e instanceof ConfigException));
        waitUntilCondition(() -> eventBus.publishedEvents().stream().anyMatch(p -> p instanceof BucketOpenRetriedEvent));
        for (Event event : eventBus.publishedEvents()) {
            if (event instanceof BucketOpenRetriedEvent) {
                assertEquals(bucketName, ((BucketOpenRetriedEvent) event).bucketName());
                assertTrue(event.cause() instanceof BucketNotFoundDuringLoadException);
            }
        }
    } finally {
        provider.shutdown().block();
    }
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Arrays(java.util.Arrays) EndpointConnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionFailedEvent) SeedNode(com.couchbase.client.core.env.SeedNode) ClusterType(com.couchbase.client.test.ClusterType) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Duration(java.time.Duration) ConfigException(com.couchbase.client.core.error.ConfigException) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Util.waitUntilCondition(com.couchbase.client.test.Util.waitUntilCondition) Set(java.util.Set) Event(com.couchbase.client.core.cnc.Event) CoreEnvironment(com.couchbase.client.core.env.CoreEnvironment) BucketNotFoundDuringLoadException(com.couchbase.client.core.error.BucketNotFoundDuringLoadException) 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) AfterEach(org.junit.jupiter.api.AfterEach) List(java.util.List) BucketOpenRetriedEvent(com.couchbase.client.core.cnc.events.config.BucketOpenRetriedEvent) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) AlreadyShutdownException(com.couchbase.client.core.error.AlreadyShutdownException) Optional(java.util.Optional) Core(com.couchbase.client.core.Core) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) TimeoutConfig(com.couchbase.client.core.env.TimeoutConfig) Collections(java.util.Collections) SeedNode(com.couchbase.client.core.env.SeedNode) ConfigException(com.couchbase.client.core.error.ConfigException) BucketNotFoundDuringLoadException(com.couchbase.client.core.error.BucketNotFoundDuringLoadException) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) BucketOpenRetriedEvent(com.couchbase.client.core.cnc.events.config.BucketOpenRetriedEvent) SimpleEventBus(com.couchbase.client.core.cnc.SimpleEventBus) EndpointConnectionFailedEvent(com.couchbase.client.core.cnc.events.endpoint.EndpointConnectionFailedEvent) Event(com.couchbase.client.core.cnc.Event) BucketOpenRetriedEvent(com.couchbase.client.core.cnc.events.config.BucketOpenRetriedEvent) HashSet(java.util.HashSet) IgnoreWhen(com.couchbase.client.test.IgnoreWhen) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) Test(org.junit.jupiter.api.Test)

Example 4 with ConfigException

use of com.couchbase.client.core.error.ConfigException in project couchbase-jvm-clients by couchbase.

the class CouchbaseBucketConfig method buildPartitionHosts.

/**
 * Helper method to reference the partition hosts from the raw node list.
 *
 * @param nodeInfos the node infos.
 * @param partitionInfo the partition info.
 * @return a ordered reference list for the partition hosts.
 */
private static List<NodeInfo> buildPartitionHosts(List<NodeInfo> nodeInfos, PartitionInfo partitionInfo) {
    List<NodeInfo> partitionHosts = new ArrayList<>();
    for (String rawHost : partitionInfo.partitionHosts()) {
        String convertedHost;
        int directPort;
        try {
            String[] parts = rawHost.split(":");
            String host = "";
            String port = parts[parts.length - 1];
            if (parts.length > 2) {
                // Handle IPv6 syntax
                for (int i = 0; i < parts.length - 1; i++) {
                    host += parts[i];
                    if (parts[i].endsWith("]")) {
                        break;
                    } else {
                        host += ":";
                    }
                }
                if (host.startsWith("[") && host.endsWith("]")) {
                    host = host.substring(1, host.length() - 1);
                }
                if (host.endsWith(":")) {
                    host = host.substring(0, host.length() - 1);
                }
            } else {
                // Simple IPv4 Handling
                host = parts[0];
            }
            convertedHost = host;
            try {
                directPort = Integer.parseInt(port);
            } catch (NumberFormatException e) {
                // TODO: LOGGER.warn("Could not parse port from the node address: {}, fallback to 0", system(rawHost));
                directPort = 0;
            }
        } catch (Exception e) {
            throw new ConfigException("Could not resolve " + rawHost + "on config building.", e);
        }
        for (NodeInfo nodeInfo : nodeInfos) {
            // Make sure we only take into account nodes which contain KV
            if (!nodeInfo.services().containsKey(ServiceType.KV)) {
                continue;
            }
            if (nodeInfo.hostname().equals(convertedHost) && (nodeInfo.services().get(ServiceType.KV) == directPort || directPort == 0)) {
                partitionHosts.add(nodeInfo);
            }
        }
    }
    if (partitionHosts.size() != partitionInfo.partitionHosts().length) {
        throw new ConfigException("Partition size is not equal after conversion, this is a bug.");
    }
    return partitionHosts;
}
Also used : ArrayList(java.util.ArrayList) ConfigException(com.couchbase.client.core.error.ConfigException) ConfigException(com.couchbase.client.core.error.ConfigException)

Example 5 with ConfigException

use of com.couchbase.client.core.error.ConfigException in project couchbase-jvm-clients by couchbase.

the class DefaultConfigurationProvider method openBucket.

@Override
public Mono<Void> openBucket(final String name) {
    return Mono.defer(() -> {
        if (!shutdown.get()) {
            bucketConfigLoadInProgress.incrementAndGet();
            boolean tls = core.context().environment().securityConfig().tlsEnabled();
            int kvPort = tls ? DEFAULT_KV_TLS_PORT : DEFAULT_KV_PORT;
            int managerPort = tls ? DEFAULT_MANAGER_TLS_PORT : DEFAULT_MANAGER_PORT;
            final Optional<String> alternate = core.context().alternateAddress();
            return Flux.range(1, Math.min(MAX_PARALLEL_LOADERS, currentSeedNodes().size())).flatMap(index -> Flux.fromIterable(currentSeedNodes()).take(Math.min(index, currentSeedNodes().size())).last().flatMap(seed -> {
                NodeIdentifier identifier = new NodeIdentifier(seed.address(), seed.clusterManagerPort().orElse(DEFAULT_MANAGER_PORT));
                final AtomicReference<Map<ServiceType, Integer>> alternatePorts = new AtomicReference<>();
                final Optional<String> alternateAddress = alternate.map(a -> mapAlternateAddress(a, seed, tls, alternatePorts));
                final int mappedKvPort;
                final int mappedManagerPort;
                if (alternateAddress.isPresent()) {
                    Map<ServiceType, Integer> ports = alternatePorts.get();
                    mappedKvPort = ports.get(ServiceType.KV);
                    mappedManagerPort = ports.get(ServiceType.MANAGER);
                } else {
                    mappedKvPort = seed.kvPort().orElse(kvPort);
                    mappedManagerPort = seed.clusterManagerPort().orElse(managerPort);
                }
                return loadBucketConfigForSeed(identifier, mappedKvPort, mappedManagerPort, name, alternateAddress);
            }).retryWhen(Retry.from(companion -> companion.flatMap(rs -> {
                final Throwable f = rs.failure();
                if (shutdown.get()) {
                    return Mono.error(new AlreadyShutdownException());
                }
                if (f instanceof UnsupportedConfigMechanismException) {
                    return Mono.error(Exceptions.propagate(f));
                }
                boolean bucketNotFound = f instanceof BucketNotFoundDuringLoadException;
                boolean bucketNotReady = f instanceof BucketNotReadyDuringLoadException;
                // For bucket not found or not ready wait a bit longer, retry the rest quickly
                Duration delay = bucketNotFound || bucketNotReady ? Duration.ofMillis(500) : Duration.ofMillis(1);
                eventBus.publish(new BucketOpenRetriedEvent(name, delay, core.context(), f));
                return Mono.just(rs.totalRetries()).delayElement(delay, core.context().environment().scheduler());
            })))).take(1).switchIfEmpty(Mono.error(new ConfigException("Could not locate a single bucket configuration for bucket: " + name))).map(ctx -> {
                proposeBucketConfig(ctx);
                return ctx;
            }).then(registerRefresher(name)).doOnTerminate(bucketConfigLoadInProgress::decrementAndGet).onErrorResume(t -> closeBucketIgnoreShutdown(name).then(Mono.error(t)));
        } else {
            return Mono.error(new AlreadyShutdownException());
        }
    });
}
Also used : KeyValueBucketRefresher(com.couchbase.client.core.config.refresher.KeyValueBucketRefresher) Retry(reactor.util.retry.Retry) UnsignedLEB128(com.couchbase.client.core.util.UnsignedLEB128) BucketConfigUpdatedEvent(com.couchbase.client.core.cnc.events.config.BucketConfigUpdatedEvent) ClusterManagerBucketLoader(com.couchbase.client.core.config.loader.ClusterManagerBucketLoader) BestEffortRetryStrategy(com.couchbase.client.core.retry.BestEffortRetryStrategy) JsonNode(com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode) EventBus(com.couchbase.client.core.cnc.EventBus) NetworkResolution(com.couchbase.client.core.env.NetworkResolution) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceType(com.couchbase.client.core.service.ServiceType) Duration(java.time.Duration) Map(java.util.Map) GlobalConfigRetriedEvent(com.couchbase.client.core.cnc.events.config.GlobalConfigRetriedEvent) GlobalConfigUpdatedEvent(com.couchbase.client.core.cnc.events.config.GlobalConfigUpdatedEvent) CollectionMapRefreshFailedEvent(com.couchbase.client.core.cnc.events.config.CollectionMapRefreshFailedEvent) Mapper(com.couchbase.client.core.json.Mapper) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) BucketNotFoundDuringLoadException(com.couchbase.client.core.error.BucketNotFoundDuringLoadException) Collectors(java.util.stream.Collectors) ResponseStatus(com.couchbase.client.core.msg.ResponseStatus) Objects(java.util.Objects) List(java.util.List) Stream(java.util.stream.Stream) BucketOpenRetriedEvent(com.couchbase.client.core.cnc.events.config.BucketOpenRetriedEvent) ConfigIgnoredEvent(com.couchbase.client.core.cnc.events.config.ConfigIgnoredEvent) SeedNodesUpdatedEvent(com.couchbase.client.core.cnc.events.config.SeedNodesUpdatedEvent) Optional(java.util.Optional) ClusterManagerBucketRefresher(com.couchbase.client.core.config.refresher.ClusterManagerBucketRefresher) Exceptions(reactor.core.Exceptions) GlobalRefresher(com.couchbase.client.core.config.refresher.GlobalRefresher) UnsupportedConfigMechanismException(com.couchbase.client.core.error.UnsupportedConfigMechanismException) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) FluxSink(reactor.core.publisher.FluxSink) CouchbaseException(com.couchbase.client.core.error.CouchbaseException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) SeedNode(com.couchbase.client.core.env.SeedNode) AtomicReference(java.util.concurrent.atomic.AtomicReference) IndividualGlobalConfigLoadFailedEvent(com.couchbase.client.core.cnc.events.config.IndividualGlobalConfigLoadFailedEvent) ConfigException(com.couchbase.client.core.error.ConfigException) CollectionMapRefreshIgnoredEvent(com.couchbase.client.core.cnc.events.config.CollectionMapRefreshIgnoredEvent) RequestCanceledException(com.couchbase.client.core.error.RequestCanceledException) CancellationReason(com.couchbase.client.core.msg.CancellationReason) CbCollections.copyToUnmodifiableSet(com.couchbase.client.core.util.CbCollections.copyToUnmodifiableSet) BucketNotReadyDuringLoadException(com.couchbase.client.core.error.BucketNotReadyDuringLoadException) GlobalLoader(com.couchbase.client.core.config.loader.GlobalLoader) Mono(reactor.core.publisher.Mono) KeyValueBucketLoader(com.couchbase.client.core.config.loader.KeyValueBucketLoader) GetCollectionIdRequest(com.couchbase.client.core.msg.kv.GetCollectionIdRequest) ReplayProcessor(reactor.core.publisher.ReplayProcessor) Flux(reactor.core.publisher.Flux) SeedNodeOutdatedException(com.couchbase.client.core.error.SeedNodeOutdatedException) CollectionMap(com.couchbase.client.core.io.CollectionMap) Collections.unmodifiableSet(java.util.Collections.unmodifiableSet) AlreadyShutdownException(com.couchbase.client.core.error.AlreadyShutdownException) CollectionIdentifier(com.couchbase.client.core.io.CollectionIdentifier) Core(com.couchbase.client.core.Core) CollectionMapRefreshSucceededEvent(com.couchbase.client.core.cnc.events.config.CollectionMapRefreshSucceededEvent) AtomicReference(java.util.concurrent.atomic.AtomicReference) Duration(java.time.Duration) ConfigException(com.couchbase.client.core.error.ConfigException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceType(com.couchbase.client.core.service.ServiceType) BucketNotFoundDuringLoadException(com.couchbase.client.core.error.BucketNotFoundDuringLoadException) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) BucketOpenRetriedEvent(com.couchbase.client.core.cnc.events.config.BucketOpenRetriedEvent) BucketNotReadyDuringLoadException(com.couchbase.client.core.error.BucketNotReadyDuringLoadException) AlreadyShutdownException(com.couchbase.client.core.error.AlreadyShutdownException) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) CollectionMap(com.couchbase.client.core.io.CollectionMap) UnsupportedConfigMechanismException(com.couchbase.client.core.error.UnsupportedConfigMechanismException)

Aggregations

ConfigException (com.couchbase.client.core.error.ConfigException)6 Core (com.couchbase.client.core.Core)4 AlreadyShutdownException (com.couchbase.client.core.error.AlreadyShutdownException)4 EventBus (com.couchbase.client.core.cnc.EventBus)3 BucketOpenRetriedEvent (com.couchbase.client.core.cnc.events.config.BucketOpenRetriedEvent)3 SeedNode (com.couchbase.client.core.env.SeedNode)3 BucketNotFoundDuringLoadException (com.couchbase.client.core.error.BucketNotFoundDuringLoadException)3 RequestCanceledException (com.couchbase.client.core.error.RequestCanceledException)3 UnsupportedConfigMechanismException (com.couchbase.client.core.error.UnsupportedConfigMechanismException)3 BestEffortRetryStrategy (com.couchbase.client.core.retry.BestEffortRetryStrategy)3 Duration (java.time.Duration)3 Optional (java.util.Optional)3 BucketConfigUpdatedEvent (com.couchbase.client.core.cnc.events.config.BucketConfigUpdatedEvent)2 CollectionMapRefreshFailedEvent (com.couchbase.client.core.cnc.events.config.CollectionMapRefreshFailedEvent)2 CollectionMapRefreshIgnoredEvent (com.couchbase.client.core.cnc.events.config.CollectionMapRefreshIgnoredEvent)2 CollectionMapRefreshSucceededEvent (com.couchbase.client.core.cnc.events.config.CollectionMapRefreshSucceededEvent)2 ConfigIgnoredEvent (com.couchbase.client.core.cnc.events.config.ConfigIgnoredEvent)2 GlobalConfigRetriedEvent (com.couchbase.client.core.cnc.events.config.GlobalConfigRetriedEvent)2 GlobalConfigUpdatedEvent (com.couchbase.client.core.cnc.events.config.GlobalConfigUpdatedEvent)2 IndividualGlobalConfigLoadFailedEvent (com.couchbase.client.core.cnc.events.config.IndividualGlobalConfigLoadFailedEvent)2