Class BinaryMemoryCalculator

  • All Implemented Interfaces:
    ConfigurableCacheMap.UnitCalculator, OldCache.UnitCalculator

    public class BinaryMemoryCalculator
    extends SimpleMemoryCalculator
    A UnitCalculator implementation that weighs a cache entry based upon the amount of physical memory (in bytes) required to store the entry.

    This implementation can only determine an accurate entry size if both the entry key and value are Binary objects; otherwise, an exception will be thrown during the unit calculation.

    Author:
    jh 2005.12.14
    • Constructor Detail

      • BinaryMemoryCalculator

        public BinaryMemoryCalculator()
    • Method Detail

      • main

        public static void main​(String[] asArg)
        Unit test.

        Usage:

         java com.tangosol.net.cache.BinaryMemoryCalculator
         
        Parameters:
        asArg - command line arguments