|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.writer.AbstractCacheWriter
public abstract class AbstractCacheWriter
A convenience abstract base class that implements all CacheWriter
methods.
write(net.sf.ehcache.Element)
, writeAll(java.util.Collection)
, delete(net.sf.ehcache.CacheEntry)
and deleteAll(java.util.Collection)
methods throw
UnsupportedOperationException
unless they're overridden by the class that is extending
AbstractCacheWriter
. Classes that are extending this abstract base class should make sure that the
appropriate cache writer operation methods are implemented with their application functionalities.
Constructor Summary | |
---|---|
AbstractCacheWriter()
|
Method Summary | |
---|---|
CacheWriter |
clone(Ehcache cache)
Creates a clone of this writer. |
void |
delete(CacheEntry entry)
Delete the cache entry from the store |
void |
deleteAll(java.util.Collection<CacheEntry> entries)
Remove data and keys from the underlying store for the given collection of keys, if present. |
void |
dispose()
Providers may be doing all sorts of exotic things and need to be able to clean up on dispose. |
void |
init()
Notifies writer to initialise themselves. |
void |
write(Element element)
Write the specified value under the specified key to the underlying store. |
void |
writeAll(java.util.Collection<Element> elements)
Write the specified Elements to the underlying store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCacheWriter()
Method Detail |
---|
public void write(Element element) throws CacheException
write
in interface CacheWriter
element
- the element to be written
CacheException
public void writeAll(java.util.Collection<Element> elements) throws CacheException
writeAll
in interface CacheWriter
elements
- the Elements to be written
CacheException
public void delete(CacheEntry entry) throws CacheException
delete
in interface CacheWriter
entry
- the cache entry that is used for the delete operation
CacheException
public void deleteAll(java.util.Collection<CacheEntry> entries) throws CacheException
deleteAll
in interface CacheWriter
entries
- the entries that have been removed from the cache
CacheException
public CacheWriter clone(Ehcache cache) throws java.lang.CloneNotSupportedException
clone
in interface CacheWriter
java.lang.CloneNotSupportedException
- if the extension could not be cloned.public void init()
init
in interface CacheWriter
public void dispose() throws CacheException
dispose
in interface CacheWriter
CacheException
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |