|
Spring Data Couchbase | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.couchbase.cache.CouchbaseCache
public class CouchbaseCache
The CouchbaseCache class implements the Spring Cache interface on top of Couchbase Server and the Couchbase
Java SDK.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.springframework.cache.Cache |
|---|
Cache.ValueWrapper |
| Constructor Summary | |
|---|---|
CouchbaseCache(String name,
com.couchbase.client.CouchbaseClient client)
Construct the cache and pass in the CouchbaseClient instance. |
|
| Method Summary | ||
|---|---|---|
void |
clear()
Clear the complete cache. |
|
void |
evict(Object key)
Remove an object from Couchbase. |
|
Cache.ValueWrapper |
get(Object key)
Get an element from the cache. |
|
|
get(Object key,
Class<T> clazz)
|
|
String |
getName()
Returns the name of the cache. |
|
com.couchbase.client.CouchbaseClient |
getNativeCache()
Returns the actual CouchbaseClient instance. |
|
void |
put(Object key,
Object value)
Store a object in Couchbase. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CouchbaseCache(String name,
com.couchbase.client.CouchbaseClient client)
name - the name of the cache reference.client - the CouchbaseClient instance.| Method Detail |
|---|
public final String getName()
getName in interface Cachepublic final com.couchbase.client.CouchbaseClient getNativeCache()
getNativeCache in interface Cachepublic final Cache.ValueWrapper get(Object key)
get in interface Cachekey - the key to lookup against.
public final <T> T get(Object key,
Class<T> clazz)
public final void put(Object key,
Object value)
put in interface Cachekey - the Key of the storable object.value - the Object to store.public final void evict(Object key)
evict in interface Cachekey - the Key of the object to delete.public final void clear()
clear in interface Cache
|
Spring Data Couchbase | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||