Interface IUnitCalculator
A unit calculator is an object that can calculate the cost of caching an object.
Namespace: Tangosol.Net.Cache
Assembly: Coherence.dll
Syntax
public interface IUnitCalculator
Properties
Name
Obtain the name of the unit calculator.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string | The name of the unit calculator. |
Remarks
This is intended to be human readable for use in a monitoring tool; examples include "SimpleMemoryCalculator" and "BinaryMemoryCalculator".
Methods
CalculateUnits(object, object)
Calculate a cache cost for the specified cache entry key and value.
Declaration
int CalculateUnits(object oKey, object oValue)
Parameters
Type | Name | Description |
---|---|---|
object | oKey | The cache key to evaluate for unit cost. |
object | oValue | The cache value to evaluate for unit cost. |
Returns
Type | Description |
---|---|
int | An integer value 0 or greater, with a larger value signifying a higher cost. |