Package org.cache2k.integration
Class CacheWriter<K,V>
- java.lang.Object
-
- org.cache2k.integration.CacheWriter<K,V>
-
- All Implemented Interfaces:
Customization,DataAware<K,V>,DataAwareCustomization<K,V>,CacheWriter<K,V>
@Deprecated public abstract class CacheWriter<K,V> extends Object implements CacheWriter<K,V>
Deprecated.Replaced withCacheWriter- Author:
- Jens Wilke
-
-
Constructor Summary
Constructors Constructor Description CacheWriter()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description abstract voiddelete(K key)Deprecated.Called when a mapping is removed from the cache.abstract voidwrite(K key, V value)Deprecated.Called when the value was updated or inserted into the cache.
-
-
-
Method Detail
-
write
public abstract void write(K key, V value) throws Exception
Deprecated.Called when the value was updated or inserted into the cache.Calling cache operations: It is illegal to call any cache methods from this method. This may have an undesired effect and can cause a deadlock.
- Specified by:
writein interfaceCacheWriter<K,V>- Parameters:
key- key of the value to be written, never null.value- the value to be written, may be null if null is permitted.- Throws:
Exception- if an exception occurs, the cache update will not occur and this exception will be wrapped in aCacheWriterException
-
delete
public abstract void delete(K key) throws Exception
Deprecated.Called when a mapping is removed from the cache. The removal was done byCache.remove(K)orCache.removeAll(). An expiry does not trigger a call to this method.- Specified by:
deletein interfaceCacheWriter<K,V>- Parameters:
key- key of the value removed from the cache, never null.- Throws:
Exception- if an exception occurs, the cache update will not occur and this exception will be wrapped in aCacheWriterException
-
-