Interface INamedCache
An INamedCache is an ICache that adds lifecycle management, event support, concurrency control, the ability to query cache content, and entry-targeted processing and aggregating operations.
Inherited Members
Namespace: Tangosol.Net
Assembly: Coherence.dll
Syntax
public interface INamedCache : IObservableCache, IConcurrentCache, IQueryCache, IInvocableCache, ICache, IDictionary, ICollection, IEnumerable, IDisposable
Remarks
Cached resources are expected to be managed in memory, and are typically composed of data that are stored persistently in a database, or data that have been assembled or calculated at some significant cost, thus these resources are referred to as cached.
Properties
CacheName
Gets the cache name.
Declaration
string CacheName { get; }
Property Value
Type | Description |
---|---|
string | The cache name. |
CacheService
Gets the ICacheService that this INamedCache is a part of.
Declaration
ICacheService CacheService { get; }
Property Value
Type | Description |
---|---|
ICacheService | The cache service this INamedCache is a part of. |
IsActive
Specifies whether or not the INamedCache is active.
Declaration
bool IsActive { get; }
Property Value
Type | Description |
---|---|
bool | true if the INamedCache is active; false otherwise. |
Methods
Destroy()
Release and destroy this instance of INamedCache.
Declaration
void Destroy()
Remarks
Warning: This method is used to completely destroy the specified cache across the cluster. All references in the entire cluster to this cache will be invalidated, the cached data will be cleared, and all resources will be released.
Caches should be destroyed by the same mechansim in which they were obtained. For example:
- new Cache() - cache.Destroy()
- CacheFactory.GetCache() - CacheFactory.DestroyCache()
- ConfigurableCacheFactory.EnsureCache() - ConfigurableCacheFactory.DestroyCache()
Release()
Release local resources associated with this instance of INamedCache.
Declaration
void Release()
Remarks
Releasing a cache makes it no longer usable, but does not affect the cache itself. In other words, all other references to the cache will still be valid, and the cache data is not affected by releasing the reference. Any attempt to use this reference afterword will result in an exception.
Caches should be released by the same mechansim in which they were obtained. For example:
- new Cache() - cache.Release()
- CacheFactory.GetCache() - CacheFactory.ReleaseCache()
- ConfigurableCacheFactory.EnsureCache() - ConfigurableCacheFactory.ReleaseCache()
Truncate()
Removes all mappings from this map.
Declaration
void Truncate()
Remarks
Note: the removal of entries caused by this truncate operation will not be observable.
View()
Construct a view of this INamedCache.
Declaration
ViewBuilder View()
Returns
Type | Description |
---|---|
ViewBuilder | A local view for this INamedCache |