public class CouchbaseConfiguration<K,V> extends javax.cache.configuration.MutableConfiguration<K,V> implements Serializable
A CompleteConfiguration
with Couchbase-specific elements like associated bucket, etc…
Modifier and Type | Class and Description |
---|---|
static class |
CouchbaseConfiguration.Builder<K,V>
Builder for creating
CouchbaseConfigurations . |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_BUCKET_NAME |
static String |
DEFAULT_BUCKET_PASSWORD |
static String |
DEFAULT_VIEWALL_DESIGNDOC |
static long |
serialVersionUID |
Modifier and Type | Method and Description |
---|---|
static <K,V> CouchbaseConfiguration.Builder<K,V> |
builder(String name)
Creates and return a
CouchbaseConfiguration.Builder for creating configuration for a CouchbaseCache with the given name. |
String |
getAllViewDesignDoc()
In order to list all elements present in cache, a view must be created for each cache.
|
String |
getAllViewName()
In order to be able to list all elements present in cache, a view must be created for each cache.
|
String |
getBucketName()
Returns the name of the bucket in which the cached data will be stored.
|
String |
getBucketPassword()
Returns the password for the bucket.
|
String |
getCacheName()
The name of the cache this configuration will be used to create.
|
String |
getCachePrefix()
In case multiple caches store data in the same bucket, a prefix is needed to distinguish keys of each cache.
|
addCacheEntryListenerConfiguration, equals, getCacheEntryListenerConfigurations, getCacheLoaderFactory, getCacheWriterFactory, getExpiryPolicyFactory, getKeyType, getValueType, hashCode, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, removeCacheEntryListenerConfiguration, setCacheLoaderFactory, setCacheWriterFactory, setExpiryPolicyFactory, setManagementEnabled, setReadThrough, setStatisticsEnabled, setStoreByValue, setTypes, setWriteThrough
public static final long serialVersionUID
public static final String DEFAULT_BUCKET_NAME
public static final String DEFAULT_BUCKET_PASSWORD
public static final String DEFAULT_VIEWALL_DESIGNDOC
public String getBucketName()
Returns the name of the bucket in which the cached data will be stored.
public String getBucketPassword()
Returns the password for the bucket.
getBucketName()
public String getCachePrefix()
In case multiple caches store data in the same bucket, a prefix is needed to distinguish keys of each cache.
public String getAllViewName()
In order to be able to list all elements present in cache, a view must be created for each cache. These view are expected to be created by the user. Standard name for a view is the cache’s name, but one can change this when creating the configuration.
This method returns the view name for the cache associated.
getAllViewDesignDoc()
public String getAllViewDesignDoc()
In order to list all elements present in cache, a view must be created for each cache. These view are expected to be created by the user. They must all be under the same design document, as returned by this method.
public String getCacheName()
The name of the cache this configuration will be used to create.
public static <K,V> CouchbaseConfiguration.Builder<K,V> builder(String name)
Creates and return a CouchbaseConfiguration.Builder
for creating configuration for a CouchbaseCache
with the given name.
The default is to use a shared bucket , with the name of the cache followed by an underscore as the prefix for keys in said bucket. To enumerate all values in the cache, a view is used, defaults to for the design document and the name of the cache for the view.
name
- the name of the cache to be created via the produced configuration.NullPointerException
- if the given cache name is nullIllegalArgumentException
- if the given cache name is emptyCopyright © 2014 Couchbase, Inc.