CoherenceTM v3.3
Copyright© 2000-2007 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(Object oKey, Object oValue)
          Calculate a cache cost for the specified cache entry key and value.
 

Method Detail

calculateUnits

int calculateUnits(Object oKey,
                   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.3
Copyright© 2000-2007 by Oracle Corporation