Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.net.cache
Interface ConfigurableCacheMap.UnitCalculator

All Known Subinterfaces:
OldCache.UnitCalculator
All Known Implementing Classes:
BinaryMemoryCalculator, OldCache.InternalUnitCalculator, SimpleMemoryCalculator
Enclosing interface:
ConfigurableCacheMap

public static interface ConfigurableCacheMap.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.
 String getName()
          Obtain the name of the unit calculator.

 

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

getName

String getName()
Obtain the name of the unit calculator. This is intended to be human readable for use in a monitoring tool; examples include "SimpleMemoryCalculator" and "BinaryMemoryCalculator".
Returns:
the name of the unit calculator

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.