|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.module.spring.objectstore.SpringCacheObjectStore<T>
public class SpringCacheObjectStore<T extends Serializable>
Implements an ObjectStore
using Spring module cache.
Nested Class Summary | |
---|---|
static class |
SpringCacheObjectStore.ObjectStoreValue<T extends Serializable>
Provides a place holder to store values inside a Spring cache to be able to save null values. |
Constructor Summary | |
---|---|
SpringCacheObjectStore()
|
Method Summary | |
---|---|
boolean |
contains(Serializable key)
Check whether the given Object is already registered with this store. |
org.springmodules.cache.provider.CacheProviderFacade |
getCacheProvider()
|
org.springmodules.cache.CachingModel |
getCachingModel()
|
boolean |
isPersistent()
Is this store persistent? |
T |
remove(Serializable key)
Remove the object with key. |
T |
retrieve(Serializable key)
Retrieve the given Object. |
void |
setCacheProvider(org.springmodules.cache.provider.CacheProviderFacade cacheProvider)
|
void |
setCachingModel(org.springmodules.cache.CachingModel cachingModel)
|
void |
store(Serializable key,
T value)
Store the given Object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringCacheObjectStore()
Method Detail |
---|
public boolean contains(Serializable key) throws ObjectStoreException
ObjectStore
contains
in interface ObjectStore<T extends Serializable>
key
- the identifier of the object to check
true
if the key is stored or false
no value was stored for
the key.
ObjectStoreException
- if the given key is null
.
ObjectStoreNotAvaliableException
- if any implementation-specific error occured, e.g.
when the store is not availablepublic void store(Serializable key, T value) throws ObjectStoreException
ObjectStore
store
in interface ObjectStore<T extends Serializable>
key
- the identifier for value
value
- the Object to store with key
ObjectStoreException
- if the given key cannot be stored or is null
.
ObjectStoreNotAvaliableException
- if the store is not available or any other
implementation-specific error occured.
ObjectAlreadyExistsException
- if an attempt is made to store an object for a key
that already has an object associated.public T retrieve(Serializable key) throws ObjectStoreException
ObjectStore
retrieve
in interface ObjectStore<T extends Serializable>
key
- the identifier of the object to retrieve.
ObjectDoesNotExistException
.
ObjectStoreException
- if the given key is null
.
ObjectStoreNotAvaliableException
- if the store is not available or any other
implementation-specific error occured.
ObjectDoesNotExistException
- if no value for the given key was previously stored.public T remove(Serializable key) throws ObjectStoreException
ObjectStore
remove
in interface ObjectStore<T extends Serializable>
key
- the identifier of the object to remove.
ObjectStoreException
- if the given key is null
or if the store is not
available or any other implementation-specific error occured
ObjectDoesNotExistException
- if no value for the given key was previously stored.public boolean isPersistent()
ObjectStore
isPersistent
in interface ObjectStore<T extends Serializable>
public org.springmodules.cache.provider.CacheProviderFacade getCacheProvider()
public void setCacheProvider(org.springmodules.cache.provider.CacheProviderFacade cacheProvider)
public org.springmodules.cache.CachingModel getCachingModel()
public void setCachingModel(org.springmodules.cache.CachingModel cachingModel)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |