public interface ConfigurationProvider
ConfigurationProvider.
One ConfigurationProvider is needed per bucket.| Modifier and Type | Method and Description |
|---|---|
Bucket |
bootstrap()
Initiate the config fetching process, eventually returning a valid
configuration.
|
java.lang.String |
getAnonymousAuthBucket()
Retrieves a default bucket name i.e.
|
Bucket |
getConfig()
Returns the current
Bucket configuration. |
void |
reloadConfig()
Method used to signal a new configuration should be loaded.
|
void |
setConfig(Bucket config)
Explictly set the current
Bucket configuration. |
void |
setConfig(java.lang.String config)
Replace the current config with a raw JSON string configuration.
|
void |
shutdown()
Shut down the
ConfigurationProvider. |
void |
signalOutdated()
Can be used as a hint for the
ConfigurationProvider to signal that
his current configuration may be outdated. |
void |
subscribe(Reconfigurable rec)
Subscribes for configuration updates.
|
void |
unsubscribe(Reconfigurable rec)
Unsubscribe from updates on the connected bucket.
|
Bucket bootstrap() throws ConfigurationException
ConfigurationException - if no valid configuration could be loaded.Bucket getConfig()
Bucket configuration.void setConfig(java.lang.String config)
config - the raw string configuration.void signalOutdated()
ConfigurationProvider to signal that
his current configuration may be outdated.void reloadConfig()
void shutdown()
ConfigurationProvider.java.lang.String getAnonymousAuthBucket()
void subscribe(Reconfigurable rec)
rec - reconfigurable that will receive updatesConfigurationExceptionvoid unsubscribe(Reconfigurable rec)
rec - reconfigurableCopyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.