Class AbstractCacheStore<K,V>

java.lang.Object
com.tangosol.util.Base
com.tangosol.net.cache.AbstractCacheLoader<K,V>
com.tangosol.net.cache.AbstractCacheStore<K,V>
All Implemented Interfaces:
CacheLoader<K,V>, CacheStore<K,V>
Direct Known Subclasses:
BinaryStoreCacheStore, CacheLoaderCacheStore, MapCacheStore, ReadWriteBackingMap.CacheLoaderCacheStore

public abstract class AbstractCacheStore<K,V> extends AbstractCacheLoader<K,V> implements CacheStore<K,V>
An abstract base class for the JCache CacheLoader.
Author:
cp 2003.05.29, jh 2005.09.01
  • Constructor Details

    • AbstractCacheStore

      public AbstractCacheStore()
  • Method Details

    • store

      public void store(K key, V value)
      Store the specified value under the specified key in the underlying store. This method is intended to support both key/value creation and value update for a specific key.
      Specified by:
      store in interface CacheStore<K,V>
      Parameters:
      key - key to store the value under
      value - value to be stored
      Throws:
      UnsupportedOperationException - if this implementation or the underlying store is read-only
    • erase

      public void erase(K key)
      Remove the specified key from the underlying store if present.
      Specified by:
      erase in interface CacheStore<K,V>
      Parameters:
      key - key whose mapping is being removed from the cache
      Throws:
      UnsupportedOperationException - if this implementation or the underlying store is read-only