CoherenceTM v3.4
Copyright© 2000-2008 by Oracle Corporation

com.tangosol.net.cache
Interface OldCache.UnitCalculator

All Known Implementing Classes:
BinaryMemoryCalculator, SimpleMemoryCalculator
Enclosing class:
OldCache

public static interface OldCache.UnitCalculator

A unit calculator is an object that can calculate the cost of caching an object.


Method Summary
 int calculateUnits(java.lang.Object oKey, java.lang.Object oValue)
          Calculate a cache cost for the specified cache entry key and value.
 

Method Detail

calculateUnits

int calculateUnits(java.lang.Object oKey,
                   java.lang.Object oValue)
Calculate a cache cost for the specified cache entry key and value.

Parameters:
oKey - the cache key to evaluate for unit cost
oValue - the cache value to evaluate for unit cost
Returns:
an integer value 0 or greater, with a larger value signifying a higher cost

CoherenceTM v3.4
Copyright© 2000-2008 by Oracle Corporation