Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
12c (12.2.1.4.0)
E90869-02

The LocalCache type exposes the following members.

Constructors

  NameDescription
Public methodLocalCache()()()()
Construct the cache manager.
Public methodLocalCache(Int32)
Construct the cache manager.
Public methodLocalCache(Int32, Int32)
Construct the cache manager.
Public methodLocalCache(Int32, Int32, Double)
Construct the cache manager.
Public methodLocalCache(Int32, Int32, ICacheLoader)
Construct the cache manager.

Methods

  NameDescription
Public methodAcquireReadLock()()()()
Acquire a read lock.
(Inherited from SynchronizedDictionary.)
Public methodAcquireReadLock(Int32)
Acquire a read lock.
(Inherited from SynchronizedDictionary.)
Public methodAcquireWriteLock()()()()
Acquire a write lock.
(Inherited from SynchronizedDictionary.)
Public methodAcquireWriteLock(Int32)
Acquire a write lock.
(Inherited from SynchronizedDictionary.)
Public methodAdd
Adds an element with the provided key and value to the cache.
(Overrides SynchronizedDictionary..::..Add(Object, Object).)
Public methodAddCacheListener(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.
Public methodAddCacheListener(ICacheListener, Object, Boolean)
Add a cache listener for a specific key.
Public methodAddCacheListener(ICacheListener, IFilter, Boolean)
Add a cache listener that receives events based on a filter evaluation.
Public methodAddIndex
Add an index to this IQueryCache.
Protected methodAddInternal
Add new cache entry and raise Inserted event if necessary.
Protected methodAdjustUnits
Adjust current size.
Public methodAggregate(ICollection, IEntryAggregator)
Perform an aggregating operation against the entries specified by the passed keys.
Public methodAggregate(IFilter, IEntryAggregator)
Perform an aggregating operation against the collection of entries that are selected by the given IFilter.
Protected methodCheckFlush
Flush the cache if it needs to be flushed.
Protected methodCheckSize
Check if the cache is too big, and if it is prune it by discarding the lowest priority cache entries.
Public methodClear
Removes all elements from the ICache object.
(Overrides SynchronizedDictionary..::..Clear()()()().)
Protected methodClearInternal
Utility method to support clear and truncation operations.
Protected methodConfigureEviction
Configure the eviction type and policy.
Protected methodConfigureUnitCalculator
Configure the unit calculator type and implementation.
Public methodContains
Determines whether the object contains an element with the specified key.
(Overrides SynchronizedDictionary..::..Contains(Object).)
Public methodContainsKey
Determines whether the IDictionary object contains an element with the specified key.
Public methodContainsValue
Determines whether the IDictionary object contains an element with the specified value.
Public methodCopyTo
Copies the elements of the IDictionary to an Array, starting at a particular index.
(Overrides SynchronizedDictionary..::..CopyTo(Array, Int32).)
Protected methodCreateEntry
Creates an ICacheEntry.
Protected methodDispatchEvent
Dispatch the passed event.
Protected methodEnsureEntry
Create a LocalCache..::..Entry object for the specified key.
Protected methodEnsureEntryCollection
Create an array of LocalCache..::..Entry objects for the specified ICache and the keys collection.
Protected methodEnsureIndexMap
Obtain the IDictionary of indexes maintained by this cache.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodEvict()()()()
Evict all entries from the cache that are no longer valid, and potentially prune the cache size if the cache is size-limited and its size is above the caching low water mark.
Public methodEvict(Object)
Evict a specified key from the cache, as if it had expired from the cache.
Public methodEvictAll
Evict the specified keys from the cache, as if they had each expired from the cache.
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAll
Get the values for all the specified keys, if they are in the cache.
Public methodGetCacheEntry
Locate a cache entry in the cache based on its key.
Public methodGetEntries(IFilter)
Return a collection of the entries contained in this cache that satisfy the criteria expressed by the filter.
Public methodGetEntries(IFilter, IComparer)
Return a collection of the entries contained in this cache that satisfy the criteria expressed by the filter.
Public methodGetEntry
Locate an LocalCache..::..Entry in the cache based on its key.
Protected methodGetEntryInternal
Locate an LocalCache..::..Entry in the cache based on its key.
Public methodGetEnumerator
Returns an ICacheEnumerator object for the ICache instance.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetKeys
Return a collection of the keys contained in this cache for entries that satisfy the criteria expressed by the filter.
Public methodGetObjectData
Populates SerializationInfo with the data needed to serialize this object.
(Inherited from SynchronizedDictionary.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValues(IFilter)
Return a collection of the values contained in this cache for entries that satisfy the criteria expressed by the filter.
Public methodGetValues(IFilter, IComparer)
Return a collection of the values contained in this cache for entries that satisfy the criteria expressed by the filter.
Protected methodHasListeners
Determine if the LocalCache has any listeners at all.
Public methodInsert(Object, Object)
Associates the specified value with the specified key in this cache.
Public methodInsert(Object, Object, Int64)
Associates the specified value with the specified key in this cache.
Public methodInsertAll
Copies all of the mappings from the specified dictionary to this cache (optional operation).
Protected methodInstantiateCacheEnumerator
Factory method for cache enumerator.
Protected methodInstantiateCacheEvent
Factory pattern: instantiate a new CacheEventArgs corresponding to the specified parameters.
Protected methodInstantiateEntriesCollection
Factory method that creates virtual collection of cache entries.
Protected methodInstantiateInternalListener
Factory pattern: Instantiate an internal ICacheListener to listen to this cache and report changes to the ICacheStore.
Protected methodInstantiateKeysCollection
Factory method that creates virtual collection of cache keys.
Protected methodInstantiateValuesCollection
Factory method that creates virtual collection of cache values.
Public methodInvoke
Invoke the passed IEntryProcessor against the entry specified by the passed key, returning the result of the invocation.
Public methodInvokeAll(ICollection, IEntryProcessor)
Invoke the passed IEntryProcessor against the entries specified by the passed keys, returning the result of the invocation for each.
Public methodInvokeAll(IFilter, IEntryProcessor)
Invoke the passed IEntryProcessor against the set of entries that are selected by the given IFilter, returning the result of the invocation for each.
Protected methodIsFlushRequired
Check if the cache needs to be flushed.
Public methodLoad
Indicates to the cache that the specified key should be loaded into the cache, if it is not already in the cache.
Public methodLoadAll()()()()
Indicates to the cache that it should load data from its loader to fill the cache; this is sometimes referred to as "pre-loading" or "warming" a cache.
Public methodLoadAll(ICollection)
Indicates to the cache that the specified keys should be loaded into the cache, if they are not already in the cache.
Public methodLock(Object)
Attempt to lock the specified item and return immediately.
Public methodLock(Object, Int64)
Attempt to lock the specified item within the specified period of time.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPeek
Checks for a valid entry corresponding to the specified key in the cache, and returns the corresponding value if it is.
Public methodPeekAll
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.
Protected methodPeekEntryInternal
Locate an LocalCache..::..Entry in the cache based on its key.
Protected methodPrune
Prune the cache by discarding the lowest priority cache entries.
Public methodReleaseReadLock
Release a read lock.
(Inherited from SynchronizedDictionary.)
Public methodReleaseWriteLock
Release a write lock.
(Inherited from SynchronizedDictionary.)
Public methodRemove
Removes the element with the specified key from the ICache object.
(Overrides SynchronizedDictionary..::..Remove(Object).)
Public methodRemoveCacheListener(ICacheListener)
Remove a standard cache listener that previously signed up for all events.
Public methodRemoveCacheListener(ICacheListener, Object)
Remove a cache listener that previously signed up for events about a specific key.
Public methodRemoveCacheListener(ICacheListener, IFilter)
Remove a cache listener that previously signed up for events based on a filter evaluation.
Protected methodRemoveExpired
Remove an entry because it has expired.
Public methodRemoveIndex
Remove an index from this IQueryCache.
Protected methodRemoveInternal
Remove an entry.
Public methodResetHitStatistics
Reset the cache statistics.
Protected methodScheduleFlush
Schedule the next flush.
Public methodToString
Returns a string representation of this LocalCache object.
(Overrides Object..::..ToString()()()().)
Public methodTruncate
Removes all mappings from this map.
Public methodUnlock
Unlock the specified item.

Extension Methods

  NameDescription
Public Extension MethodGetOrDefault
Returns the value to which the specified key is mapped, or the defaultValue if this cache contains no mapping for the key.
(Defined by InvocableCacheEx.)
Public Extension MethodInsertIfAbsent
If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.
(Defined by InvocableCacheEx.)
Public Extension MethodRemove
Removes the entry for the specified key only if it is currently mapped to the specified value.
(Defined by InvocableCacheEx.)
Public Extension MethodReplace(Object, Object)Overloaded.
Replaces the entry for the specified key only if it is currently mapped to some value.
(Defined by InvocableCacheEx.)
Public Extension MethodReplace(Object, Object, Object)Overloaded.
Replaces the entry for the specified key only if currently mapped to the specified value.
(Defined by InvocableCacheEx.)

Fields

  NameDescription
Public fieldStatic memberDEFAULT_EXPIRE
By default, the cache entries never expire.
Public fieldStatic memberDEFAULT_FLUSH
By default, expired cache entries are flushed on a minute interval.
Protected fieldDEFAULT_KEY_MASK
The default key mask that ignores nothing.
Public fieldStatic memberDEFAULT_PRUNE
By default, when the cache prunes, it reduces its entries by 25%, meaning it retains 75% (.75) of its entries.
Public fieldStatic memberDEFAULT_UNITS
By default, the cache size (in units) is infinite.
Protected fieldm_avgTouch
For a prune cycle, this value is the average number of touches that an entry should have. This value is used by the hybrid eviction policy.
Protected fieldm_dict
Wrapped, non-thread safe dictionary.
(Inherited from SynchronizedDictionary.)
Protected fieldm_lastPrune
The last time that a prune was run. This value is used by the hybrid eviction policy.

Properties

  NameDescription
Public propertyCacheHits
Gets the rough number of cache hits since the cache statistics were last reset.
Public propertyCacheLoader
Gets or sets the loader used by this LocalCache.
Public propertyCacheMisses
Gets the rough number of cache misses since the cache statistics were last reset.
Public propertyCacheStatistics
Gets the ICacheStatistics for this cache.
Protected propertyCacheStore
Determine the store used by this LocalCache, if any.
Public propertyCalculatorType
Gets or sets the current unit calculator type for the cache.
Public propertyCount
Gets the number of elements contained in the ICache.
(Overrides SynchronizedDictionary..::..Count.)
Protected propertyCurrentKeyMask
Gets or sets the current key mask for the current thread.
Public propertyDelegate
Return the delegate IDictionary.
(Inherited from SynchronizedDictionary.)
Public propertyEntries
Get a collection of ICacheEntry instances within the cache.
Public propertyEvictionPolicy
Determine the current external eviction policy, if any.
Public propertyEvictionType
Gets or sets the current eviction type.
Public propertyExpiryDelay
Gets or sets the "time to live" for each individual cache entry.
Public propertyFlushDelay
Gets or sets the delay between cache flushes.
Public propertyFlushTime
Gets or sets the date/time offset in milliseconds at which the next cache flush is scheduled.
Public propertyHighUnits
Gets or sets the limit of the cache size in units.
Public propertyHitProbability
Gets the rough probability (0 <= p <= 1) that any particular "get" invocation will be satisfied by an existing entry in the cache, based on the statistics collected since the last reset of the cache statistics.
Protected propertyIndexMap
The index IDictionary used by this LocalCache.
Public propertyIsFixedSize
Get a value indicating whether this dictionary has a fixed size.
(Inherited from SynchronizedDictionary.)
Public propertyIsReadLockHeld
Determines whether or not the current thread holds a read lock.
(Inherited from SynchronizedDictionary.)
Public propertyIsReadOnly
Get a value indicating whether this dictionary is read-only.
(Inherited from SynchronizedDictionary.)
Public propertyIsSynchronized
Gets a value indicating whether access to this dictionary is thread-safe.
(Inherited from SynchronizedDictionary.)
Public propertyIsWriteLockHeld
Determines whether or not the current thread holds the write lock.
(Inherited from SynchronizedDictionary.)
Public propertyItem
Gets or sets the element with the specified key.
(Overrides SynchronizedDictionary..::..Item[([( Object])]) .)
Public propertyKeys
Get the keys collection.
(Overrides SynchronizedDictionary..::..Keys.)
Public propertyLowUnits
Gets or sets the point to which the cache will shrink when it prunes.
Public propertyPruneLevel
The percentage of the total number of units that will remain after the cache manager prunes the cache.
Protected propertyStorage
Get underlying cache storage.
Public propertySyncRoot
Get an object that can be used to synchronize access to this dictionary.
(Inherited from SynchronizedDictionary.)
Public propertyUnitCalculator
Gets or sets the current external unit calculator, if any.
Public propertyUnits
Gets the number of units that the cache currently stores.
Public propertyValues
Get the values collection.
(Overrides SynchronizedDictionary..::..Values.)

See Also