com.hazelcast.map.impl.eviction
Class MaxSizeChecker

java.lang.Object
  extended by com.hazelcast.map.impl.eviction.MaxSizeChecker

public class MaxSizeChecker
extends Object

Checks whether a specific threshold is exceeded or not according to configured MaxSizeConfig.MaxSizePolicy to start eviction process.

See Also:
EvictionOperator.maxSizeChecker

Constructor Summary
MaxSizeChecker(MapServiceContext mapServiceContext)
           
MaxSizeChecker(MemoryInfoAccessor memoryInfoAccessor, MapServiceContext mapServiceContext)
           
 
Method Summary
 boolean checkEvictable(MapContainer mapContainer, int partitionId)
           
static int getApproximateMaxSize(MaxSizeConfig maxSizeConfig, MaxSizeConfig.MaxSizePolicy policy)
          Get max size setting form config for given policy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxSizeChecker

public MaxSizeChecker(MapServiceContext mapServiceContext)

MaxSizeChecker

public MaxSizeChecker(MemoryInfoAccessor memoryInfoAccessor,
                      MapServiceContext mapServiceContext)
Method Detail

checkEvictable

public boolean checkEvictable(MapContainer mapContainer,
                              int partitionId)

getApproximateMaxSize

public static int getApproximateMaxSize(MaxSizeConfig maxSizeConfig,
                                        MaxSizeConfig.MaxSizePolicy policy)
Get max size setting form config for given policy

Returns:
max size or -1 if policy is different or not set


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