Provides access to members that control an object memoizer.
Members
Name | Description | |
---|---|---|
Add | Memoizes an object uniquely associated with the specified key. Adding more objects than allowed (as indicated by the .MaximumSize property) would cause one or more previously memoized items to be removed based on an implementation-specific eviction strategy. | |
Clear | Clears the object cache associated with the memoizer. | |
Count | The number of object currently held by the memoizer. | |
Exists | Returns TRUE if a previously memoized object associated with the specified key is found. | |
Get | Retrieves the previously memoized object associated with the specified key and increments its usage count. | |
MaximumSize | The maximum allowed number of objects held by the memoizer. | |
Remove | Removes the previously memoized object associated with the specified key. |
IObjectMemoizer.Add Method
Memoizes an object uniquely associated with the specified key. Adding more objects than allowed (as indicated by the .MaximumSize property) would cause one or more previously memoized items to be removed based on an implementation-specific eviction strategy.
Public Sub Add ( _
ByVal vtKey As Object, _
ByVal ppObject As Object _
)
public void Add (
object vtKey,
object ppObject
);
IObjectMemoizer.Clear Method
Clears the object cache associated with the memoizer.
Public Sub Clear ( _
)
public void Clear (
);
IObjectMemoizer.Count Property
The number of object currently held by the memoizer.
Public ReadOnly Property Count As Integer
public int Count {get;}
IObjectMemoizer.Exists Method
Returns TRUE if a previously memoized object associated with the specified key is found.
Public Function Exists ( _
ByVal vtKey As Object _
) As Boolean
public bool Exists (
object vtKey
);
IObjectMemoizer.Get Method
Retrieves the previously memoized object associated with the specified key and increments its usage count.
Public Function Get ( _
ByVal vtKey As Object _
) As Object
public object Get (
object vtKey
);
IObjectMemoizer.MaximumSize Property
The maximum allowed number of objects held by the memoizer.
Public Property MaximumSize As Integer
public int MaximumSize {get; set;}
IObjectMemoizer.Remove Method
Removes the previously memoized object associated with the specified key.
Public Sub Remove ( _
ByVal vtKey As Object _
)
public void Remove (
object vtKey
);
Classes that implement IObjectMemoizer
Classes | Description |
---|---|
ObjectMemoizer | A basic LRU-based object memoizer. |