Top Description Methods
net.sf.ehcache.writer

public Interface CacheWriterManager

Known Direct Implementers
net.sf.ehcache.writer.writebehind.WriteBehindManager, net.sf.ehcache.writer.writethrough.WriteThroughManager
Imports
net.sf.ehcache.Cache, .CacheEntry, .CacheException, .Element

A CacheWriterManager coordinates how element are written to a back-end store.

The CacheWriterManager will in its turn call the CacheWriter that belongs to the relevant cache to perform the actual write logic as it's implemented by the user.

Author
Geert Bevin
Version
$Id: CacheWriterManager.java 10789 2018-04-26 02:08:13Z adahanne $

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Cleans up the resources of the cache writer manager.

public void
init(Cache
the cache with which the writer manager
cache
)

Initialize the cache writer manager.

public void
put(Element
the element that should be used for the operation
element
)

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
)

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

Method Detail

disposeback to summary
public void dispose() throws CacheException

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

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

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

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