Interface ICacheStorage<T>
Interface for reference counting storage underlying a cache.
Namespace: System.Memory
Assembly: Nuqleon.Memory.dll
Syntax
public interface ICacheStorage<T>
Type Parameters
| Name | Description |
|---|---|
| T | Type of objects in the cache. |
Properties
Count
Gets the current number of entries stored in the cache.
Declaration
int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
GetEntry(T)
Gets the cache entry for the provided value.
Declaration
IReference<T> GetEntry(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value. |
Returns
| Type | Description |
|---|---|
| IReference<T> | The cache entry. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if the provided value is null. |
ReleaseEntry(IReference<T>)
Releases a cache entry.
Declaration
void ReleaseEntry(IReference<T> entry)
Parameters
| Type | Name | Description |
|---|---|---|
| IReference<T> | entry | The entry to release. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if the provided entry is null. |
| System.ArgumentException | Thrown if the value contained in the entry is null. |