com.couchbase.client.vbucket
Interface ConfigurationProvider

All Known Implementing Classes:
ConfigurationProviderHTTP

public interface ConfigurationProvider

A ConfigurationProvider.


Method Summary
 void finishResubscribe()
           
 java.lang.String getAnonymousAuthBucket()
          Retrieves a default bucket name i.e.
 java.lang.String getBucket()
          Returns the current bucket name.
 Bucket getBucketConfiguration(java.lang.String bucketname)
          Connects to the REST service and retrieves the bucket configuration from the first pool available.
 Reconfigurable getReconfigurable()
          Returns the current Reconfigurable object.
 void markForResubscribe(java.lang.String bucketName, Reconfigurable rec)
           
 void shutdown()
          Shutdowns a monitor connections to the REST service.
 void subscribe(java.lang.String bucketName, Reconfigurable rec)
          Subscribes for configuration updates.
 void unsubscribe(java.lang.String vbucketName, Reconfigurable rec)
          Unsubscribe from updates on a given bucket and given reconfigurable.
 void updateBucket(java.lang.String bucketname, Bucket newBucket)
          Update the bucket including configuration.
 

Method Detail

getBucketConfiguration

Bucket getBucketConfiguration(java.lang.String bucketname)
Connects to the REST service and retrieves the bucket configuration from the first pool available.

Parameters:
bucketname - bucketname
Returns:
vbucket configuration
Throws:
ConfigurationException

updateBucket

void updateBucket(java.lang.String bucketname,
                  Bucket newBucket)
Update the bucket including configuration.

Parameters:
bucketname - the name of the bucket
newBucket - the new bucket including config

subscribe

void subscribe(java.lang.String bucketName,
               Reconfigurable rec)
Subscribes for configuration updates.

Parameters:
bucketName - bucket name to receive configuration for
rec - reconfigurable that will receive updates
Throws:
ConfigurationException

markForResubscribe

void markForResubscribe(java.lang.String bucketName,
                        Reconfigurable rec)

unsubscribe

void unsubscribe(java.lang.String vbucketName,
                 Reconfigurable rec)
Unsubscribe from updates on a given bucket and given reconfigurable.

Parameters:
vbucketName - bucket name
rec - reconfigurable

shutdown

void shutdown()
Shutdowns a monitor connections to the REST service.


getAnonymousAuthBucket

java.lang.String getAnonymousAuthBucket()
Retrieves a default bucket name i.e. 'default'.

Returns:
the anonymous bucket's name i.e. 'default'

finishResubscribe

void finishResubscribe()

getReconfigurable

Reconfigurable getReconfigurable()
Returns the current Reconfigurable object.


getBucket

java.lang.String getBucket()
Returns the current bucket name.



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