com.hazelcast.cache.impl.maxsize.impl
Class EntryCountCacheMaxSizeChecker

java.lang.Object
  extended by com.hazelcast.cache.impl.maxsize.impl.EntryCountCacheMaxSizeChecker
All Implemented Interfaces:
CacheMaxSizeChecker

public class EntryCountCacheMaxSizeChecker
extends Object
implements CacheMaxSizeChecker

Cache max-size policy implementation for CacheEvictionConfig.CacheMaxSizePolicy.ENTRY_COUNT


Constructor Summary
EntryCountCacheMaxSizeChecker(int size, CacheRecordMap cacheRecordMap, int partitionCount)
           
 
Method Summary
static int calculateMaxPartitionSize(int maxEntryCount, int partitionCount)
           
 boolean isReachedToMaxSize()
          Checks the state of cache about if is reached to max size as its configured com.hazelcast.config.CacheMaxSizeConfig.CacheMaxSizePolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryCountCacheMaxSizeChecker

public EntryCountCacheMaxSizeChecker(int size,
                                     CacheRecordMap cacheRecordMap,
                                     int partitionCount)
Method Detail

calculateMaxPartitionSize

public static int calculateMaxPartitionSize(int maxEntryCount,
                                            int partitionCount)

isReachedToMaxSize

public boolean isReachedToMaxSize()
Description copied from interface: CacheMaxSizeChecker
Checks the state of cache about if is reached to max size as its configured com.hazelcast.config.CacheMaxSizeConfig.CacheMaxSizePolicy

Specified by:
isReachedToMaxSize in interface CacheMaxSizeChecker
Returns:
true if cache is reached to max-size, otherwise false


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.