CompositeCache Class | 
Namespace: Tangosol.Net.Cache
public class CompositeCache : ICache, IDictionary, ICollection, IEnumerable, ICacheStatistics, IDisposable
The CompositeCache type exposes the following members.
| Name | Description | |
|---|---|---|
| CompositeCache(ICache, ICache) | 
            Construct a CompositeCache using two specified
            caches:
             
  | |
| CompositeCache(ICache, ICache, CompositeCacheStrategyType) | 
            Construct a CompositeCache using two specified
            caches:
             
  | 
| Name | Description | |
|---|---|---|
| AverageGetMillis | 
            Determine the average number of milliseconds per "get"
            invocation since the cache statistics were last reset.
              | |
| AverageHitMillis | 
            Determine the average number of milliseconds per "get"
            invocation that is a hit.
              | |
| AverageMissMillis | 
            Determine the average number of milliseconds per "get" invocation
            that is a miss.
              | |
| AveragePruneMillis | 
            Determine the average number of milliseconds per cache pruning.
              | |
| AveragePutMillis | 
            Determine the average number of milliseconds per "put"
            invocation since the cache statistics were last reset.
              | |
| BackCache | 
            Obtain the back cache reference.
              | |
| CacheControl | 
            Obtain the IConcurrentCache that should be used to
            synchronize the front cache modification access.
              | |
| CacheHits | 
            Determine the rough number of cache hits since the cache
            statistics were last reset.
              | |
| CacheHitsMillis | 
            Determine the total number of milliseconds (since that last
            statistics reset) for the "get" operations for which an entry
            existed in this cache.
              | |
| CacheMisses | 
            Determine the rough number of cache misses since the cache
            statistics were last reset.
              | |
| CacheMissesMillis | 
            Determine the total number of milliseconds (since that last
            statistics reset) for the "get" operations for which no entry
            existed in this map.
              | |
| CachePrunes | 
            Determine the rough number of cache pruning cycles since the
            cache statistics were last reset.
              | |
| CachePrunesMillis | 
            Determine the total number of milliseconds (since that last
            statistics reset) spent on cache pruning.
              | |
| CacheStatistics | 
            Obtain the CacheStatistics for this cache.
              | |
| Count | 
            Gets the number of elements contained in the
            BackCache.
              | |
| Entries | 
            Gets a collection of ICacheEntry instances
            within the cache.
              | |
| FrontCache | 
            Obtain the front cache reference.
              | |
| HitProbability | 
            Determine the rough probability (0 <= p <= 1) that the next
            invocation will be a hit, based on the statistics collected since
            the last reset of the cache statistics.
              | |
| InvalidationHits | 
            Determine the rough number of front cache invalidation hits
            since the cache statistics were last reset.
              | |
| InvalidationMisses | 
            Determine the rough number of front cache invalidation
            misses since the cache statistics were last reset.
              | |
| InvalidationStrategy | 
            Obtain the invalidation strategy used by this
            CompositeCache.
              | |
| IsCoherent | 
            Determine if changes to the back cache affect the front cache so
            that data in the front cache stays in sync.
              | |
| IsFixedSize | 
            Gets a value indicating whether the BackCache
            object has a fixed size.
              | |
| IsReadOnly | 
            Gets a value indicating whether the BackCache
            object is read-only.
              | |
| IsSynchronized | 
            Gets a value indicating whether access to the back cache is
            synchronized (thread safe).
              | |
| Item | 
            Gets or sets the element with the specified key.
              | |
| Keys | 
            Obtain an ICollection of the keys contained in this cache.
              | |
| SyncRoot | 
            Gets an object that can be used to synchronize access to the back
            cache.
              | |
| TotalGets | 
            Determine the total number of "get" operations since the cache
            statistics were last reset.
              | |
| TotalGetsMillis | 
            Determine the total number of milliseconds spent on "get"
            operations since the cache statistics were last reset.
              | |
| TotalPuts | 
            Determine the total number of "put" operations since the cache
            statistics were last reset.
              | |
| TotalPutsMillis | 
            Determine the total number of milliseconds spent on "put"
            operations since the cache statistics were last reset.
              | |
| TotalRegisterListener | 
            Determine the total number of
            RegisterListener(Object) operations since the cache
            statistics were last reset.
              | |
| Values | 
            Obtain an ICollection of the values contained in this
            cache.
              | 
| Name | Description | |
|---|---|---|
| Add | 
            Associates the specified value with the specified key in this
            cache.
              | |
| Clear | 
            Clears both the front and back caches.
              | |
| Contains | 
            Check whether or not this cache contains a mapping for the
            specified key.
              | |
| CopyTo | 
            Copies the elements of the BackCache to an
            Array, starting at a particular Array index.
              | |
| Dispose | 
            Calls Release to release the resources associated with this cache.
              | |
| EnsureInvalidationStrategy | 
            Ensure that a strategy has been choosen and that any appropriate
            global listeners have been registered.
              | |
| Equals | 
            Compares the specified object with this dictionary for equality.
              (Overrides ObjectEquals(Object).) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.  (Inherited from Object.) | |
| GetAll | 
            Get the values for all the specified keys, if they are in the
            cache.
              | |
| GetEnumerator | 
            Returns an enumerator that iterates through a cache.
              | |
| GetHashCode | 
            Return the hash code value for this dictionary.
              (Overrides ObjectGetHashCode.) | |
| GetType | Gets the Type of the current instance.  (Inherited from Object.) | |
| Insert(Object, Object) | 
            Associates the specified value with the specified key in this
            cache.
              | |
| Insert(Object, Object, Int64) | 
            Associates the specified value with the specified key in this
            cache.
              | |
| InsertAll | 
            Copies all of the mappings from the specified dictionary to this
            cache (optional operation).
              | |
| InstantiateBackCacheListener | 
            Factory pattern: instantiate back cache listener.
              | |
| InstantiateFrontCacheListener | 
            Factory pattern: instantiate front cache listener.
              | |
| InvalidateFront | 
            Invalidate the key from the front.
              | |
| IsPriming | 
            Check if the specified event is a "priming" one.
              | |
| MemberwiseClone | Creates a shallow copy of the current Object.  (Inherited from Object.) | |
| RegisterDeactivationListener | 
            Instantiate and register a DeactivationListener with the back cache.
              | |
| RegisterFrontListener | 
            Register the global front cache listener.
              | |
| RegisterListener | 
            Register the global back cache listener.
              | |
| RegisterListener(Object) | 
            Register the back cache listener for the specified key.
              | |
| RegisterListeners | 
            Register the back map listeners for the specified set of keys.
              | |
| Release | 
            Release the CompositeCache.
              | |
| Remove | 
            Remove the mapping for this key from this cache if present.
              | |
| RemoveKeyHolder | 
            Remove the key holder from the ThreadLocal object.
              | |
| ResetFrontMap | 
            Reset the front map.
              | |
| ResetHitStatistics | 
            Reset the cache statistics.
              | |
| ResetInvalidationStrategy | 
            Reset the "current invalidation strategy" flag.
              | |
| SetKeyHolder | 
            Set up a thread local Set to hold all the keys that might be evicted
            from the front cache.
              | |
| ToString | 
            For debugging purposes, format the contents of the
            CompositeCache in a human readable format.
              (Overrides ObjectToString.) | |
| TryLock | 
            Lock the keys in the given set without blocking.
              | |
| UnregisterDeactivationListener | 
            Unregister back cache deactivation listener.
              | |
| UnregisterFrontListener | 
            Unregister the global front cache listener.
              | |
| UnregisterListener | 
            Unregister the global back cache listener.
              | |
| UnregisterListener(Object) | 
            Unregister the back cache listener for the specified key.
              | |
| UnregisterListeners | 
            Unregister the back cache listener for the specified keys.
             Note: all the keys in the passed-in set must be locked and will be unlocked.  | |
| Validate | 
            Validate the front cache entry for the specified back cache
            event.
              | 
| Name | Description | |
|---|---|---|
| m_strategyCurrent | 
            The current invalidation strategy, which at times could be
            different from the target strategy.
              | |
| m_strategyTarget | 
            The invalidation strategy that this cache is to use.
              | |
| s_tloKeys | 
            The ThreadLocal to hold all the keys that are evicted while the front cache
            is updated during get or getAll operation.
              | 
If the back cache implements IObservableCache interface, the CompositeCache provides four different strategies of invalidating the front cache entries that have changed by other processes in the back cache:
The front cache implementation is assumed to be thread safe; additionally any modifications to the front cache are allowed only after the corresponding lock is acquired against the CacheControl property.
Note:null values are not cached in the front cache and therefore this implementation is not optimized for caches that allow null values to be stored.