Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.util
Class NullImplementation.NullCacheStore

java.lang.Object
  extended by com.tangosol.util.NullImplementation.NullCacheStore

All Implemented Interfaces:
CacheLoader, CacheStore
Enclosing class:
NullImplementation

public static class NullImplementation.NullCacheStore
extends java.lang.Object
implements CacheStore

An implementation of an CacheStore that does nothing.


Field Summary
static NullImplementation.NullCacheStore INSTANCE
          Singleton instance.

 

Constructor Summary
NullImplementation.NullCacheStore()
           

 

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.
 java.lang.Object load(java.lang.Object oKey)
          Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.
 java.util.Map loadAll(java.util.Collection colKeys)
          Return the values associated with each the specified keys in the passed collection.
 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.

 

Field Detail

INSTANCE

public static final NullImplementation.NullCacheStore INSTANCE
Singleton instance.

Constructor Detail

NullImplementation.NullCacheStore

public NullImplementation.NullCacheStore()

Method Detail

load

public java.lang.Object load(java.lang.Object oKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.
Specified by:
load in interface CacheLoader
Parameters:
oKey - key whose associated value is to be returned
Returns:
the value associated with the specified key, or null if no value is available for that key

loadAll

public java.util.Map loadAll(java.util.Collection colKeys)
Return the values associated with each the specified keys in the passed collection. If a key does not have an associated value in the underlying store, then the return map will not have an entry for that key.
Specified by:
loadAll in interface CacheLoader
Parameters:
colKeys - a collection of keys to load
Returns:
a Map of keys to associated values for the specified keys

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

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.

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.

Specified by:
storeAll in interface CacheStore
Parameters:
mapEntries - a Map of any number of keys and values to store

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

eraseAll

public 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.

Specified by:
eraseAll in interface CacheStore
Parameters:
colKeys - keys whose mappings are being removed from the cache

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


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