Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
LocalCache..::.PeekAll Method
LocalCache Class See Also

Oracle® Coherence .NET API Reference Release 3.6.1
E18812-01
Checks for a valid entry corresponding to each specified key in the cache, and places the corresponding value in the returned dictionary if it is.

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

# Syntax

C#
    public virtual IDictionary PeekAll(
    	ICollection keys
    )

#### Parameters

keys
  Type: System.Collections..::.ICollection
  A collection of keys to "peek" into the cache for.

#### Return Value

An IDictionary of keys that were found in the cache and their values.

# Remarks

For each key that is not in the cache, no entry is placed into the returned dictionary. The cache does not attempt to load any values using its cache loader.

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

                 IDictionary dict = new Hashtable();

                 foreach (object key in keys)
                 {
                    Object value = Peek(key);
                    if (value != null || Contains(key))
                    {
                        dict.Add(key, value);
                    }
                 }
                 return dict;

# See Also

LocalCache Class
Tangosol.Net.Cache Namespace