Show / Hide Table of Contents

Class NullImplementation.NullObservableCache

An immutable IObservableCache which contains nothing.

Inheritance
object
NullImplementation.NullCollection
NullImplementation.NullCache
NullImplementation.NullObservableCache
Implements
IPortableObject
IObservableCache
ICache
IDictionary
ICollection
IEnumerable
Inherited Members
NullImplementation.NullCache.GetAll(ICollection)
NullImplementation.NullCache.Insert(object, object)
NullImplementation.NullCache.Insert(object, object, long)
NullImplementation.NullCache.InsertAll(IDictionary)
NullImplementation.NullCache.Entries
NullImplementation.NullCache.Contains(object)
NullImplementation.NullCache.Add(object, object)
NullImplementation.NullCache.Clear()
NullImplementation.NullCache.Remove(object)
NullImplementation.NullCache.this[object]
NullImplementation.NullCache.Keys
NullImplementation.NullCache.Values
NullImplementation.NullCache.IsReadOnly
NullImplementation.NullCache.IsFixedSize
NullImplementation.NullCollection.CopyTo(Array, int)
NullImplementation.NullCollection.Count
NullImplementation.NullCollection.SyncRoot
NullImplementation.NullCollection.IsSynchronized
NullImplementation.NullCollection.GetEnumerator()
NullImplementation.NullCollection.Equals(object)
NullImplementation.NullCollection.GetHashCode()
NullImplementation.NullCollection.ReadExternal(IPofReader)
NullImplementation.NullCollection.WriteExternal(IPofWriter)
NullImplementation.NullCollection.EMPTY_ENUMERATOR
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public class NullImplementation.NullObservableCache : NullImplementation.NullCache, IPortableObject, IObservableCache, ICache, IDictionary, ICollection, IEnumerable

Fields

Instance

Since the cache contains no information, only one ever has to exist.

Declaration
public static readonly IObservableCache Instance
Field Value
Type Description
IObservableCache

Methods

AddCacheListener(ICacheListener)

Add a standard cache listener that will receive all events (inserts, updates, deletes) that occur against the cache, with the key, old-value and new-value included.

Declaration
public void AddCacheListener(ICacheListener listener)
Parameters
Type Name Description
ICacheListener listener

The ICacheListener to add.

Remarks

This has the same result as the following call:

AddCacheListener(listener, (IFilter) null, false);

AddCacheListener(ICacheListener, object, bool)

Add a cache listener for a specific key.

Declaration
public void AddCacheListener(ICacheListener listener, object key, bool isLite)
Parameters
Type Name Description
ICacheListener listener

The ICacheListener to add.

object key

The key that identifies the entry for which to raise events.

bool isLite

true to indicate that the CacheEventArgs objects do not have to include the OldValue and NewValue property values in order to allow optimizations.

Remarks

The listeners will receive CacheEventArgs objects, but if isLite is passed as true, they might not contain the OldValue and NewValue properties.

To unregister the ICacheListener, use the RemoveCacheListener(ICacheListener, object) method.

AddCacheListener(ICacheListener, IFilter, bool)

Add a cache listener that receives events based on a filter evaluation.

Declaration
public void AddCacheListener(ICacheListener listener, IFilter filter, bool isLite)
Parameters
Type Name Description
ICacheListener listener

The ICacheListener to add.

IFilter filter

A filter that will be passed CacheEventArgs objects to select from; a CacheEventArgs will be delivered to the listener only if the filter evaluates to true for that CacheEventArgs; null is equivalent to a filter that alway returns true.

bool isLite

true to indicate that the CacheEventArgs objects do not have to include the OldValue and NewValue property values in order to allow optimizations.

Remarks

The listeners will receive CacheEventArgs objects, but if isLite is passed as true, they might not contain the OldValue and NewValue properties.

To unregister the ICacheListener, use the RemoveCacheListener(ICacheListener, IFilter) method.

RemoveCacheListener(ICacheListener)

Remove a standard cache listener that previously signed up for all events.

Declaration
public void RemoveCacheListener(ICacheListener listener)
Parameters
Type Name Description
ICacheListener listener

The ICacheListener to remove.

Remarks

This has the same result as the following call:

RemoveCacheListener(listener, (IFilter) null);

RemoveCacheListener(ICacheListener, object)

Remove a cache listener that previously signed up for events about a specific key.

Declaration
public void RemoveCacheListener(ICacheListener listener, object key)
Parameters
Type Name Description
ICacheListener listener

The listener to remove.

object key

The key that identifies the entry for which to raise events.

RemoveCacheListener(ICacheListener, IFilter)

Remove a cache listener that previously signed up for events based on a filter evaluation.

Declaration
public void RemoveCacheListener(ICacheListener listener, IFilter filter)
Parameters
Type Name Description
ICacheListener listener

The ICacheListener to remove.

IFilter filter

A filter used to evaluate events; null is equivalent to a filter that alway returns true.

Implements

IPortableObject
IObservableCache
ICache
IDictionary
ICollection
IEnumerable
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.