/**
  * 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;
   }
 }