Package com.couchbase.client.vbucket

Examples of com.couchbase.client.vbucket.ConfigurationProviderHTTP


    }

    this.bucket = bucket;
    pass = password;
    configurationProvider =
      new ConfigurationProviderHTTP(baseList, bucket, password);
  }
View Full Code Here


      throw new ConfigurationException("Could not fetch valid configuration "
        + "from provided nodes. Stopping.");
    } else if (config.isNotUpdating()) {
      LOGGER.warning("Noticed bucket configuration to be disconnected, "
        + "will attempt to reconnect");
      setConfigurationProvider(new ConfigurationProviderHTTP(storedBaseList,
        bucket, pass));
    }
    return configurationProvider.getBucketConfiguration(bucket).getConfig();
  }
View Full Code Here

          ConfigurationProvider oldConfigProvider = getConfigurationProvider();
          Reconfigurable oldRec = oldConfigProvider.getReconfigurable();

          ConfigurationProvider newConfigProvider =
            new ConfigurationProviderHTTP(storedBaseList, bucket, pass);
          newConfigProvider.subscribe(bucket, oldRec);

          setConfigurationProvider(newConfigProvider);
          oldConfigProvider.shutdown();

          if (!doingResubscribe.compareAndSet(true, false)) {
View Full Code Here

    final String bucket, final String password,
    final CouchbaseConnectionFactory connectionFactory) {
    config = new AtomicReference<Bucket>();
    configurationParser = new ConfigurationParserJSON();
    httpProvider = new AtomicReference<ConfigurationProviderHTTP>(
      new ConfigurationProviderHTTP(seedNodes, bucket, password)
    );
    refreshingHttp = new AtomicBoolean(false);
    pollingBinary = new AtomicBoolean(false);
    observers = Collections.synchronizedList(new ArrayList<Reconfigurable>());
    binaryConnection = new AtomicReference<CouchbaseConnection>();
View Full Code Here

            }
            getLogger().info("Reconnect attempt " + reconnectAttempt
              + ", waiting " + waitTime + "ms");
            Thread.sleep(waitTime);

            ConfigurationProviderHTTP oldProvider = httpProvider.get();
            ConfigurationProviderHTTP newProvider =
              new ConfigurationProviderHTTP(seedNodes, bucket, password);
            httpProvider.set(newProvider);
            monitorBucket();
            oldProvider.shutdown();
            return;
          } catch(Exception ex) {
View Full Code Here

    final String bucket, final String password,
    final CouchbaseConnectionFactory connectionFactory) {
    config = new AtomicReference<Bucket>();
    configurationParser = new ConfigurationParserJSON();
    httpProvider = new AtomicReference<ConfigurationProviderHTTP>(
      new ConfigurationProviderHTTP(seedNodes, bucket, password)
    );
    refreshingHttp = new AtomicBoolean(false);
    pollingBinary = new AtomicBoolean(false);
    observers = Collections.synchronizedList(new ArrayList<Reconfigurable>());
    binaryConnection = new AtomicReference<CouchbaseConnection>();
View Full Code Here

            }
            getLogger().info("Reconnect attempt " + reconnectAttempt
              + ", waiting " + waitTime + "ms");
            Thread.sleep(waitTime);

            ConfigurationProviderHTTP oldProvider = httpProvider.get();
            ConfigurationProviderHTTP newProvider =
              new ConfigurationProviderHTTP(seedNodes, bucket, password);
            httpProvider.set(newProvider);
            monitorBucket();
            oldProvider.shutdown();
            return;
          } catch(Exception ex) {
View Full Code Here

    }

    this.bucket = bucket;
    pass = password;
    configurationProvider =
      new ConfigurationProviderHTTP(baseList, bucket, password);
  }
View Full Code Here

      throw new ConfigurationException("Could not fetch valid configuration "
        + "from provided nodes. Stopping.");
    } else if (config.isNotUpdating()) {
      LOGGER.warning("Noticed bucket configuration to be disconnected, "
        + "will attempt to reconnect");
      setConfigurationProvider(new ConfigurationProviderHTTP(storedBaseList,
        bucket, pass));
    }
    return configurationProvider.getBucketConfiguration(bucket).getConfig();
  }
View Full Code Here

          ConfigurationProvider oldConfigProvider = getConfigurationProvider();
          Reconfigurable oldRec = oldConfigProvider.getReconfigurable();

          ConfigurationProvider newConfigProvider =
            new ConfigurationProviderHTTP(storedBaseList, bucket, pass);
          newConfigProvider.subscribe(bucket, oldRec);

          setConfigurationProvider(newConfigProvider);
          oldConfigProvider.shutdown();

          if (!doingResubscribe.compareAndSet(true, false)) {
View Full Code Here

TOP

Related Classes of com.couchbase.client.vbucket.ConfigurationProviderHTTP

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.