Show / Hide Table of Contents

Class AbstractCacheStore

An abstract base class for the ICacheStore.

Inheritance
object
AbstractCacheLoader
AbstractCacheStore
Implements
ICacheStore
ICacheLoader
Inherited Members
AbstractCacheLoader.Load(object)
AbstractCacheLoader.LoadAll(ICollection)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Tangosol.Net.Cache
Assembly: Coherence.dll
Syntax
public abstract class AbstractCacheStore : AbstractCacheLoader, ICacheStore, ICacheLoader

Methods

Erase(object)

Remove the specified key from the underlying store if present.

Declaration
public void Erase(object key)
Parameters
Type Name Description
object key

Key whose mapping is being removed from the cache.

Exceptions
Type Condition
NotSupportedException

If this implementation or the underlying store is read-only.

EraseAll(ICollection)

Remove the specified keys from the underlying store if present.

Declaration
public void EraseAll(ICollection keys)
Parameters
Type Name Description
ICollection keys

Keys whose mappings are being removed from the cache.

Remarks

The implementation of this method calls Erase(object) for each key in the supplied ICollection. Once erased successfully, a key is removed from the ICollection (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.

Exceptions
Type Condition
NotSupportedException

If this implementation or the underlying store is read-only.

Store(object, object)

Store the specified value under the specified key in the underlying store.

Declaration
public void Store(object key, object value)
Parameters
Type Name Description
object key

Key to store the value under.

object value

Value to be stored.

Remarks

This method is intended to support both key/value creation and value update for a specific key.

Exceptions
Type Condition
NotSupportedException

If this implementation or the underlying store is read-only.

StoreAll(IDictionary)

Store the specified values under the specified keys in the underlying store.

Declaration
public void StoreAll(IDictionary dictionary)
Parameters
Type Name Description
IDictionary dictionary

An IDictionary of any number of keys and values to store.

Remarks

This method is intended to support both key/value creation and value update for the specified keys.

The implementation of this method calls Store(object, object) for each entry in the supplied IDictionary. Once stored successfully, an entry is removed from the IDictionary (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.

Exceptions
Type Condition
NotSupportedException

If this implementation or the underlying store is read-only.

Implements

ICacheStore
ICacheLoader
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.