Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


com.tangosol.net.cache
Class OldCache.InternalUnitCalculator

java.lang.Object
  extended by com.tangosol.net.cache.OldCache.InternalUnitCalculator

All Implemented Interfaces:
ConfigurableCacheMap.UnitCalculator, OldCache.UnitCalculator
Enclosing class:
OldCache

public static class OldCache.InternalUnitCalculator
extends java.lang.Object
implements OldCache.UnitCalculator

The InternalUnitCalculator represents a pluggable UnitCalculator for the non-pluggable built-in (internal) UnitCalculator implementation provided by this cache implementation.


Field Summary
static OldCache.InternalUnitCalculator INSTANCE
          Singleton instance.

 

Method Summary
 int calculateUnits(java.lang.Object oKey, java.lang.Object oValue)
          Calculate a cache cost for the specified cache entry key and value.
 java.lang.String getName()
          Obtain the name of the unit calculator.

 

Field Detail

INSTANCE

public static final OldCache.InternalUnitCalculator INSTANCE
Singleton instance.

Method Detail

calculateUnits

public int calculateUnits(java.lang.Object oKey,
                          java.lang.Object oValue)
Calculate a cache cost for the specified cache entry key and value.
Specified by:
calculateUnits in interface ConfigurableCacheMap.UnitCalculator
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

public java.lang.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".
Specified by:
getName in interface ConfigurableCacheMap.UnitCalculator
Returns:
the name of the unit calculator

Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


Copyright © 2000, 2009, Oracle. All rights reserved.