public class CouchbaseCachingProvider extends Object implements javax.cache.spi.CachingProvider
The Couchbase implementation of a CachingProvider
. This implementation does not support optional features
of the JSR-107.
Constructor and Description |
---|
CouchbaseCachingProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
close(ClassLoader classLoader) |
void |
close(URI uri,
ClassLoader classLoader) |
List<String> |
getBoostrap()
This is the bootstrap list of ip/hosts used to initiate a connection to the underlying cluster.
|
javax.cache.CacheManager |
getCacheManager() |
javax.cache.CacheManager |
getCacheManager(URI uri,
ClassLoader classLoader) |
javax.cache.CacheManager |
getCacheManager(URI uri,
ClassLoader classLoader,
Properties properties) |
ClassLoader |
getDefaultClassLoader() |
Properties |
getDefaultProperties() |
URI |
getDefaultURI() |
CouchbaseEnvironment |
getEnvironment() |
boolean |
isSupported(javax.cache.configuration.OptionalFeature optionalFeature) |
void |
setBootstrap(List<String> bootstrapNodes)
Set the bootstrap list used to initiate a connection to the underlying cluster.
|
void |
setBootstrap(String... bootstrapNodes)
Set the bootstrap list used to initiate a connection to the underlying cluster.
|
void |
setEnvironment(CouchbaseEnvironment env)
Replaces the cluster environment to be used by cacheManagers with the one given.
|
void |
signalCacheManagerClosed(ClassLoader classLoader,
URI uri)
This method allows to signal the
CachingProvider that a CacheManager identified by a given URI and ClassLoader has been closed externally. |
public ClassLoader getDefaultClassLoader()
getDefaultClassLoader
in interface javax.cache.spi.CachingProvider
public URI getDefaultURI()
getDefaultURI
in interface javax.cache.spi.CachingProvider
public Properties getDefaultProperties()
getDefaultProperties
in interface javax.cache.spi.CachingProvider
public CouchbaseEnvironment getEnvironment()
public void setEnvironment(CouchbaseEnvironment env)
Replaces the cluster environment to be used by cacheManagers with the one given. Since multiple parallel environments are discouraged, it will also close all
open cacheManagers beforehand.
env
- the new CouchbaseEnvironment
to be usedpublic List<String> getBoostrap()
This is the bootstrap list of ip/hosts used to initiate a connection to the underlying cluster.
public void setBootstrap(List<String> bootstrapNodes)
Set the bootstrap list used to initiate a connection to the underlying cluster. It will be used by any CouchbaseCacheManager
created after this point.
A null or empty list will lead to default bootstrap “127.0.0.1” being used.
bootstrapNodes
- the list of connection Strings to the underlying cluster.public void setBootstrap(String... bootstrapNodes)
Set the bootstrap list used to initiate a connection to the underlying cluster. It will be used by any CouchbaseCacheManager
created after this point.
A null or empty list will lead to default bootstrap “127.0.0.1” being used.
bootstrapNodes
- the list of connection Strings to the underlying cluster.public javax.cache.CacheManager getCacheManager(URI uri, ClassLoader classLoader, Properties properties)
getCacheManager
in interface javax.cache.spi.CachingProvider
public javax.cache.CacheManager getCacheManager(URI uri, ClassLoader classLoader)
getCacheManager
in interface javax.cache.spi.CachingProvider
public javax.cache.CacheManager getCacheManager()
getCacheManager
in interface javax.cache.spi.CachingProvider
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface javax.cache.spi.CachingProvider
public void close(ClassLoader classLoader)
close
in interface javax.cache.spi.CachingProvider
public void close(URI uri, ClassLoader classLoader)
close
in interface javax.cache.spi.CachingProvider
public boolean isSupported(javax.cache.configuration.OptionalFeature optionalFeature)
isSupported
in interface javax.cache.spi.CachingProvider
public void signalCacheManagerClosed(ClassLoader classLoader, URI uri)
This method allows to signal the CachingProvider
that a CacheManager
identified by a given URI and ClassLoader has been closed externally. The manager should no longer be tracked by this provider if it was (otherwise this method does nothing).
This method does not close the CacheManager.
classLoader
- the classLoader identifying the closed manageruri
- the uri identifying the closed managerCopyright © 2014 Couchbase, Inc.