Show / Hide Table of Contents

Class ConverterCollections.ConverterConcurrentCache

A Converter ConcurrentCache views an underlying IConcurrentCache through a set of key and value IConverters.

Inheritance
object
ConverterCollections.ConverterDictionary
ConverterCollections.ConverterCache
ConverterCollections.ConverterConcurrentCache
Implements
IConcurrentCache
ICache
IDictionary
ICollection
IEnumerable
Inherited Members
ConverterCollections.ConverterCache.Cache
ConverterCollections.ConverterCache.GetAll(ICollection)
ConverterCollections.ConverterCache.Insert(object, object)
ConverterCollections.ConverterCache.Insert(object, object, long)
ConverterCollections.ConverterCache.InsertAll(IDictionary)
ConverterCollections.ConverterCache.Entries
ConverterCollections.ConverterCache.GetEnumerator()
ConverterCollections.ConverterCache.InstantiateEntries(ICollection, IConverter, IConverter, IConverter, IConverter)
ConverterCollections.ConverterCache.InstantiateCacheEnumerator(ICacheEnumerator, IConverter, IConverter, IConverter)
ConverterCollections.ConverterCache.m_entries
ConverterCollections.ConverterDictionary.Dictionary
ConverterCollections.ConverterDictionary.ConverterKeyUp
ConverterCollections.ConverterDictionary.ConverterKeyDown
ConverterCollections.ConverterDictionary.ConverterValueUp
ConverterCollections.ConverterDictionary.ConverterValueDown
ConverterCollections.ConverterDictionary.Contains(object)
ConverterCollections.ConverterDictionary.Add(object, object)
ConverterCollections.ConverterDictionary.Clear()
ConverterCollections.ConverterDictionary.Remove(object)
ConverterCollections.ConverterDictionary.this[object]
ConverterCollections.ConverterDictionary.Keys
ConverterCollections.ConverterDictionary.Values
ConverterCollections.ConverterDictionary.IsReadOnly
ConverterCollections.ConverterDictionary.IsFixedSize
ConverterCollections.ConverterDictionary.CopyTo(Array, int)
ConverterCollections.ConverterDictionary.Count
ConverterCollections.ConverterDictionary.SyncRoot
ConverterCollections.ConverterDictionary.IsSynchronized
ConverterCollections.ConverterDictionary.InstantiateCollection(ICollection, IConverter, IConverter)
ConverterCollections.ConverterDictionary.InstantiateDictionary(IDictionary, IConverter, IConverter, IConverter, IConverter)
ConverterCollections.ConverterDictionary.InstantiateDictionaryEnumerator(IDictionaryEnumerator, IConverter, IConverter)
ConverterCollections.ConverterDictionary.ToString()
ConverterCollections.ConverterDictionary.m_dictionary
ConverterCollections.ConverterDictionary.m_convKeyUp
ConverterCollections.ConverterDictionary.m_convKeyDown
ConverterCollections.ConverterDictionary.m_convValUp
ConverterCollections.ConverterDictionary.m_convValDown
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
[Serializable]
public class ConverterCollections.ConverterConcurrentCache : ConverterCollections.ConverterCache, IConcurrentCache, ICache, IDictionary, ICollection, IEnumerable

Constructors

ConverterConcurrentCache(IConcurrentCache, IConverter, IConverter, IConverter, IConverter)

Constructor.

Declaration
public ConverterConcurrentCache(IConcurrentCache cache, IConverter convKeyUp, IConverter convKeyDown, IConverter convValUp, IConverter convValDown)
Parameters
Type Name Description
IConcurrentCache cache

The underlying IConcurrentCache.

IConverter convKeyUp

The IConverter to view the underlying cache's keys through.

IConverter convKeyDown

The IConverter to use to pass keys down to the underlying cache.

IConverter convValUp

The IConverter to view the underlying cache's values through.

IConverter convValDown

The IConverter to use to pass values down to the underlying cache.

Properties

ConcurrentCache

The underlying IConcurrentCache.

Declaration
public virtual IConcurrentCache ConcurrentCache { get; }
Property Value
Type Description
IConcurrentCache

The underlying IConcurrentCache.

Methods

Lock(object)

Attempt to lock the specified item and return immediately.

Declaration
public virtual bool Lock(object key)
Parameters
Type Name Description
object key

Key being locked.

Returns
Type Description
bool

true if the item was successfully locked; false otherwise.

Remarks

This method behaves exactly as if it simply performs the call Lock(key, 0).

Lock(object, long)

Attempt to lock the specified item within the specified period of time.

Declaration
public virtual bool Lock(object key, long waitTimeMillis)
Parameters
Type Name Description
object key

Key being locked.

long waitTimeMillis

The number of milliseconds to continue trying to obtain a lock; pass zero to return immediately; pass -1 to block the calling thread until the lock could be obtained.

Returns
Type Description
bool

true if the item was successfully locked within the specified time; false otherwise.

Remarks

The item doesn't have to exist to be locked. While the item is locked there is known to be a lock holder which has an exclusive right to modify (calling put and remove methods) that item.

Lock holder is an abstract concept that depends on the IConcurrentCache implementation. For example, holder could be a cluster member or a thread (or both).

Locking strategy may vary for concrete implementations as well. Lock could have an expiration time (this lock is sometimes called a "lease") or be held indefinitely (until the lock holder terminates).

Some implementations may allow the entire cache to be locked. If the cache is locked in such a way, then only a lock holder is allowed to perform any of the "put" or "remove" operations.

Pass the special constant LOCK_ALL as the key parameter to indicate the cache lock.

Unlock(object)

Unlock the specified item.

Declaration
public virtual bool Unlock(object key)
Parameters
Type Name Description
object key

Key being unlocked.

Returns
Type Description
bool

true if the item was successfully unlocked; false otherwise.

Remarks

The item doesn't have to exist to be unlocked. If the item is currently locked, only the holder of the lock could successfully unlock it.

Implements

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