Class CacheWriter<K,​V>

    • Constructor Detail

      • CacheWriter

        public CacheWriter()
        Deprecated.
    • 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:
        write in interface CacheWriter<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 a CacheWriterException
      • delete

        public abstract void delete​(K key)
                             throws Exception
        Deprecated.
        Called when a mapping is removed from the cache. The removal was done by Cache.remove(K) or Cache.removeAll(). An expiry does not trigger a call to this method.
        Specified by:
        delete in interface CacheWriter<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 a CacheWriterException