Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.cache
Interface CacheStore

All Superinterfaces:
  CacheLoader

All Known Implementing Classes:
  AbstractCacheStore, BinaryStoreCacheStore, CacheLoaderCacheStore, CacheLoaderCacheStore.Iterable, HibernateCacheStore, JpaCacheStore, MapCacheStore, ReadWriteBackingMap.CacheLoaderCacheStore, ReadWriteBackingMap.CacheStoreWrapper, TopLinkCacheStore, VersionedBackingMap.CacheStoreWrapper

    public interface CacheStore

extends CacheLoader

A JCache cache store.

Since:
  Coherence 2.2
Author:
  cp 2003.05.29

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 interface com.tangosol.net.cache.CacheLoader
`load, loadAll`

Method Detail

### store

    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.

  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

    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.

  If this operation fails (by throwing an exception) after a partial success, the convention is that entries which have been stored successfully are to be removed from the specified `mapEntries`, indicating that the store operation for the entries left in the map has failed or has not been attempted.

  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

    void erase(java.lang.Object oKey)

  Remove the specified key from the underlying store if present.

  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

    void eraseAll(java.util.Collection colKeys)

  Remove the specified keys from the underlying store if present.

  If this operation fails (by throwing an exception) after a partial success, the convention is that keys which have been erased successfully are to be removed from the specified `colKeys`, indicating that the erase operation for the keys left in the collection has failed or has not been attempted.

  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

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.