Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
NullImplementation..::.NullCache..::.GetAll Method
NullImplementation..::.NullCache Class See Also

Oracle® Coherence .NET API Reference Release 3.6.1
E18812-01
Get the values for all the specified keys, if they are in the cache.

Namespace: Tangosol.Util
Assembly: Coherence (in Coherence.dll) Version: 3.6.1.0 (3.6.1.0)

# Syntax

C#
    public IDictionary GetAll(
    	ICollection keys
    )

#### Parameters

keys
  Type: System.Collections..::.ICollection
  A collection of keys that may be in the named cache.

#### Return Value

A dictionary of keys to values for the specified keys passed in keys.

#### Implements

ICache..::.GetAll(ICollection)

# Remarks

For each key that is in the cache, that key and its corresponding value will be placed in the dictionary that is returned by this method. The absence of a key in the returned dictionary indicates that it was not in the cache, which may imply (for caches that can load behind the scenes) that the requested data could not be loaded.

The result of this method is defined to be semantically the same as the following implementation, without regards to threading issues:

                IDictionary dict = new AnyDictionary();
                // could be a Hashtable (but does not have to)
                foreach (object key in colKeys)
                {
                    object value = this[key];
                    if (value != null || Contains(key))
                    {
                        dict[key] = value;
                    }
                }
                return dict;

# See Also

NullImplementation..::.NullCache Class
Tangosol.Util Namespace