/**
  * This method is called when there is a topology change in the cluster.
  *
  * <p>This method is intended for internal use only.
  */
 public void reconfigure(Bucket bucket) {
   reconfiguring = true;
   if (bucket.isNotUpdating()) {
     getLogger()
         .info(
             "Bucket configuration is disconnected from cluster "
                 + "configuration updates, attempting to reconnect.");
     CouchbaseConnectionFactory cbcf = (CouchbaseConnectionFactory) connFactory;
     cbcf.requestConfigReconnect(cbcf.getBucketName(), this);
   }
   try {
     vconn.reconfigure(bucket);
     if (mconn instanceof CouchbaseConnection) {
       CouchbaseConnection cbConn = (CouchbaseConnection) mconn;
       cbConn.reconfigure(bucket);
     } else {
       CouchbaseMemcachedConnection cbMConn = (CouchbaseMemcachedConnection) mconn;
       cbMConn.reconfigure(bucket);
     }
   } catch (IllegalArgumentException ex) {
     getLogger()
         .warn("Failed to reconfigure client, staying with " + "previous configuration.", ex);
   } finally {
     reconfiguring = false;
   }
 }
 @Override
 public boolean shutdown(long timeout, TimeUnit unit) {
   boolean shutdownResult = false;
   try {
     shutdownResult = super.shutdown(timeout, unit);
     CouchbaseConnectionFactory cf = (CouchbaseConnectionFactory) connFactory;
     cf.getConfigurationProvider().shutdown();
     vconn.shutdown();
   } catch (IOException ex) {
     Logger.getLogger(CouchbaseClient.class.getName())
         .log(Level.SEVERE, "Unexpected IOException in shutdown", ex);
     throw new RuntimeException(null, ex);
   }
   return shutdownResult;
 }
 /**
  * Adds an operation to the queue where it waits to be sent to Couchbase. This function is for
  * internal use only.
  */
 public void addOp(final HttpOperation op) {
   vconn.checkState();
   vconn.addOp(op);
 }