Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.cache
Class AbstractCacheStore

`java.lang.Object
com.tangosol.util.Base
com.tangosol.net.cache.AbstractCacheLoader
com.tangosol.net.cache.AbstractCacheStore`

All Implemented Interfaces:
  CacheLoader, CacheStore

Direct Known Subclasses:
  BinaryStoreCacheStore, CacheLoaderCacheStore, MapCacheStore, ReadWriteBackingMap.CacheLoaderCacheStore

      public abstract class AbstractCacheStore

extends AbstractCacheLoader
implements CacheStore

An abstract base class for the JCache CacheLoader.

Author:
  cp 2003.05.29, jh 2005.09.01

Constructor Summary
`AbstractCacheStore()`

Method Summary
`void` | `erase(java.lang.Object oKey)` Remove the specified key from the underlying store if present.
`void` | `eraseAll(java.util.Collection colKeys)` Remove the specified keys from the underlying store if present.
`void` | `store(java.lang.Object oKey, java.lang.Object oValue)` Store the specified value under the specified key in the underlying store.
`void` | `storeAll(java.util.Map mapEntries)` Store the specified values under the specified keys in the underlying store.

Methods inherited from class com.tangosol.net.cache.AbstractCacheLoader
`load, loadAll`

Methods inherited from interface com.tangosol.net.cache.CacheLoader
`load, loadAll`

Constructor Detail

### AbstractCacheStore

    public AbstractCacheStore()

Method Detail

### store

    public void store(java.lang.Object oKey,
                      java.lang.Object oValue)

  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`
  Parameters:
    `oKey` - key to store the value under
    `oValue` - value to be stored
  Throws:
    `java.lang.UnsupportedOperationException` - if this implementation or the underlying store is read-only

### storeAll

    public void storeAll(java.util.Map mapEntries)

  Store the specified values under the specified keys in the underlying store. This method is intended to support both key/value creation and value update for the specified keys.

  The implementation of this method calls `store(java.lang.Object, java.lang.Object)` for each entry in the supplied Map. Once stored successfully, an entry is removed from the Map (if possible).

  Note: For many types of persistent stores, a single store operation is as expensive as a bulk store operation; therefore, subclasses should override this method if possible.

  Specified by:
    `storeAll` in interface `CacheStore`
  Parameters:
    `mapEntries` - a Map of any number of keys and values to store
  Throws:
    `java.lang.UnsupportedOperationException` - if this implementation or the underlying store is read-only

### erase

    public void erase(java.lang.Object oKey)

  Remove the specified key from the underlying store if present.
  Specified by:
    `erase` in interface `CacheStore`
  Parameters:
    `oKey` - key whose mapping is being removed from the cache
  Throws:
    `java.lang.UnsupportedOperationException` - if this implementation or the underlying store is read-only

### eraseAll

    public void eraseAll(java.util.Collection colKeys)

  Remove the specified keys from the underlying store if present.

  The implementation of this method calls `erase(java.lang.Object)` for each key in the supplied Collection. Once erased successfully, a key is removed from the Collection (if possible).

  Note: For many types of persistent stores, a single erase operation is as expensive as a bulk erase operation; therefore, subclasses should override this method if possible.

  Specified by:
    `eraseAll` in interface `CacheStore`
  Parameters:
    `colKeys` - keys whose mappings are being removed from the cache
  Throws:
    `java.lang.UnsupportedOperationException` - if this implementation or the underlying store is read-only

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.