Class WriteThroughManager
- java.lang.Object
-
- net.sf.ehcache.writer.writethrough.WriteThroughManager
-
- All Implemented Interfaces:
CacheWriterManager
public class WriteThroughManager extends java.lang.Object implements CacheWriterManager
Implements aWriterManagerthat writes elements directly through to the underlying store.- Version:
- $Id$
- Author:
- Geert Bevin
-
-
Constructor Summary
Constructors Constructor Description WriteThroughManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Cleans up the resources of the cache writer manager.voidinit(Cache cache)Initialize the cache writer manager.voidput(Element element)Schedule a put operation for this element in the CacheWriterManager, which will call the CacheWriter when appropriate.voidremove(CacheEntry entry)Schedule a remove operation for this key in the CacheWriterManager, which will call the CacheWriter when appropriate.
-
-
-
Method Detail
-
init
public void init(Cache cache) throws CacheException
Initialize the cache writer manager.This method is called when the cache writer manager is registered to a cache.
- Specified by:
initin interfaceCacheWriterManager- Parameters:
cache- the cache with which the writer manager- Throws:
CacheException- when an exception occurs during the initialisation of the cache
-
put
public void put(Element element) throws CacheException
Schedule a put operation for this element in the CacheWriterManager, which will call the CacheWriter when appropriate.- Specified by:
putin interfaceCacheWriterManager- Parameters:
element- the element that should be used for the operation- Throws:
CacheException- when an exception occurs during the writing of the element
-
remove
public void remove(CacheEntry entry) throws CacheException
Schedule a remove operation for this key in the CacheWriterManager, which will call the CacheWriter when appropriate.- Specified by:
removein interfaceCacheWriterManager- Parameters:
entry- the entry that should be used for the operation- Throws:
CacheException- when an exception occurs during the removal of the element
-
dispose
public void dispose()
Cleans up the resources of the cache writer manager.This method is called when the manager is unregistered from a cache.
- Specified by:
disposein interfaceCacheWriterManager
-
-