Top Description Fields Constructors Methods
net.sf.ehcache.writer.writethrough

public Class WriteThroughManager

extends Object
implements CacheWriterManager
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.writer.CacheWriterManager
Imports
net.sf.ehcache.Cache, .CacheEntry, .CacheException, .Element, net.sf.ehcache.writer.CacheWriter, .CacheWriterManager, .CacheWriterManagerException

Implements a WriterManager that writes elements directly through to the underlying store.
Author
Geert Bevin
Version
$Id: WriteThroughManager.java 5594 2012-05-07 16:04:31Z cdennis $

Field Summary

Modifier and TypeField and Description
private volatile Cache

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements net.sf.ehcache.writer.CacheWriterManager.dispose.

Cleans up the resources of the cache writer manager.
public void
init(Cache
the cache with which the writer manager
cache
)

Implements net.sf.ehcache.writer.CacheWriterManager.init.

Initialize the cache writer manager.
public void
put(Element
the element that should be used for the operation
element
)

Implements net.sf.ehcache.writer.CacheWriterManager.put.

Schedule a put operation for this element in the CacheWriterManager, which will call the CacheWriter when appropriate.
public void
remove(CacheEntry
the entry that should be used for the operation
entry
)

Implements net.sf.ehcache.writer.CacheWriterManager.remove.

Schedule a remove operation for this key in the CacheWriterManager, which will call the CacheWriter when appropriate.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private volatile Cache cache

Constructor Detail

WriteThroughManagerback to summary
public WriteThroughManager()

Method Detail

disposeback to summary
public void dispose()

Implements net.sf.ehcache.writer.CacheWriterManager.dispose.

Doc from net.sf.ehcache.writer.CacheWriterManager.dispose.

Cleans up the resources of the cache writer manager.

This method is called when the manager is unregistered from a cache.

initback to summary
public void init(Cache cache) throws CacheException

Implements net.sf.ehcache.writer.CacheWriterManager.init.

Doc from net.sf.ehcache.writer.CacheWriterManager.init.

Initialize the cache writer manager.

This method is called when the cache writer manager is registered to a cache.

Parameters
cache:Cache

the cache with which the writer manager

Exceptions
CacheException:
when an exception occurs during the initialisation of the cache
putback to summary
public void put(Element element) throws CacheException

Implements net.sf.ehcache.writer.CacheWriterManager.put.

Doc from net.sf.ehcache.writer.CacheWriterManager.put.

Schedule a put operation for this element in the CacheWriterManager, which will call the CacheWriter when appropriate.

Parameters
element:Element

the element that should be used for the operation

Exceptions
CacheException:
when an exception occurs during the writing of the element
removeback to summary
public void remove(CacheEntry entry) throws CacheException

Implements net.sf.ehcache.writer.CacheWriterManager.remove.

Doc from net.sf.ehcache.writer.CacheWriterManager.remove.

Schedule a remove operation for this key in the CacheWriterManager, which will call the CacheWriter when appropriate.

Parameters
entry:CacheEntry

the entry that should be used for the operation

Exceptions
CacheException:
when an exception occurs during the removal of the element