com.couchbase.client
Class TapConnectionProvider

java.lang.Object
  extended by net.spy.memcached.compat.SpyObject
      extended by net.spy.memcached.TapConnectionProvider
          extended by com.couchbase.client.TapConnectionProvider
All Implemented Interfaces:
Reconfigurable, net.spy.memcached.ConnectionObserver

public class TapConnectionProvider
extends net.spy.memcached.TapConnectionProvider
implements Reconfigurable

A TapConnectionProvider for Couchbase Server.


Field Summary
 
Fields inherited from class net.spy.memcached.TapConnectionProvider
authDescriptor, authMonitor, conn, opFact, shuttingDown, tcService
 
Constructor Summary
TapConnectionProvider(CouchbaseConnectionFactory cf)
          Get a tap connection based on the REST response from a Couchbase server.
TapConnectionProvider(java.util.List<java.net.URI> baseList, java.lang.String bucketName, java.lang.String pwd)
          Get a tap connection based on the REST response from a Couchbase server.
 
Method Summary
 void reconfigure(Bucket bucket)
          Call on a configuration update.
 boolean removeObserver(net.spy.memcached.ConnectionObserver obs)
          Remove a connection observer.
 void shutdown()
           
 
Methods inherited from class net.spy.memcached.TapConnectionProvider
addObserver, addTapAckOp, broadcastOp, connectionEstablished, connectionLost, getOpFactory, shutdown, waitForQueues
 
Methods inherited from class net.spy.memcached.compat.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TapConnectionProvider

public TapConnectionProvider(java.util.List<java.net.URI> baseList,
                             java.lang.String bucketName,
                             java.lang.String pwd)
                      throws java.io.IOException,
                             javax.naming.ConfigurationException
Get a tap connection based on the REST response from a Couchbase server.

Parameters:
baseList - A list of URI's to use for getting cluster information.
bucketName - The name of the bucket to connect to.
pwd - The password for the bucket.
Throws:
java.io.IOException
javax.naming.ConfigurationException

TapConnectionProvider

public TapConnectionProvider(CouchbaseConnectionFactory cf)
                      throws java.io.IOException,
                             javax.naming.ConfigurationException
Get a tap connection based on the REST response from a Couchbase server.

Parameters:
cf - A connection factory to create the tap stream with
Throws:
java.io.IOException
javax.naming.ConfigurationException
Method Detail

removeObserver

public boolean removeObserver(net.spy.memcached.ConnectionObserver obs)
Remove a connection observer.

Overrides:
removeObserver in class net.spy.memcached.TapConnectionProvider
Parameters:
obs - the ConnectionObserver you wish to add
Returns:
true if the observer existed, but no longer does

reconfigure

public void reconfigure(Bucket bucket)
Description copied from interface: Reconfigurable
Call on a configuration update.

Specified by:
reconfigure in interface Reconfigurable
Parameters:
bucket - updated vbucket configuration

shutdown

public void shutdown()
Overrides:
shutdown in class net.spy.memcached.TapConnectionProvider


Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.