ehcache

net.sf.ehcache.writer
Interface CacheWriterManager

All Known Implementing Classes:
WriteBehindManager, WriteThroughManager

public interface CacheWriterManager

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.

Version:
$Id: CacheWriterManager.java 5594 2012-05-07 16:04:31Z cdennis $
Author:
Geert Bevin

Method Summary
 void dispose()
          Cleans up the resources of the cache writer manager.
 void init(Cache cache)
          Initialize the cache writer manager.
 void put(Element element)
          Schedule a put operation for this element in the CacheWriterManager, which will call the CacheWriter when appropriate.
 void remove(CacheEntry entry)
          Schedule a remove operation for this key in the CacheWriterManager, which will call the CacheWriter when appropriate.
 

Method Detail

init

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 - the cache with which the writer manager
Throws:
CacheException - when an exception occurs during the initialisation of the cache

put

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 - the element that should be used for the operation
Throws:
CacheException - when an exception occurs during the writing of the element

remove

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 - the entry that should be used for the operation
Throws:
CacheException - when an exception occurs during the removal of the element

dispose

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.

Throws:
CacheException

ehcache

Copyright 2001-2015, Terracotta, Inc.