public class EvictionChecker extends Object
MaxSizeConfig.MaxSizePolicy
to start eviction process.EvictorImpl.evictionChecker
Modifier and Type | Field and Description |
---|---|
protected ILogger |
logger |
protected MapServiceContext |
mapServiceContext |
protected MemoryInfoAccessor |
memoryInfoAccessor |
protected AtomicBoolean |
misconfiguredPerNodeMaxSizeWarningLogged |
protected static double |
ONE_HUNDRED_PERCENT |
Constructor and Description |
---|
EvictionChecker(MemoryInfoAccessor givenMemoryInfoAccessor,
MapServiceContext mapServiceContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkEvictable(RecordStore recordStore) |
protected boolean |
checkFreeHeapPercentageEviction(MaxSizeConfig maxSizeConfig) |
protected boolean |
checkFreeHeapSizeEviction(MaxSizeConfig maxSizeConfig) |
protected boolean |
checkHeapPercentageEviction(String mapName,
MaxSizeConfig maxSizeConfig) |
protected boolean |
checkHeapSizeEviction(String mapName,
MaxSizeConfig maxSizeConfig) |
protected boolean |
checkPerNodeEviction(RecordStore recordStore) |
protected boolean |
checkPerPartitionEviction(String mapName,
MaxSizeConfig maxSizeConfig,
int partitionId) |
protected List<Integer> |
findPartitionIds() |
protected long |
getAvailableMemory() |
protected long |
getFreeMemory() |
protected long |
getMaxMemory() |
protected long |
getRecordStoreHeapCost(String mapName,
PartitionContainer partitionContainer) |
protected int |
getRecordStoreSize(String mapName,
PartitionContainer partitionContainer) |
protected long |
getTotalMemory() |
protected long |
getUsedHeapInBytes(String mapName) |
protected boolean |
isOwnerOrBackup(int partitionId) |
double |
translatePerNodeSizeToPartitionSize(RecordStore recordStore)
Calculates and returns the expected maximum size of an evicted record-store
when
PER_NODE max-size-policy is used. |
protected static final double ONE_HUNDRED_PERCENT
protected final ILogger logger
protected final MapServiceContext mapServiceContext
protected final MemoryInfoAccessor memoryInfoAccessor
protected final AtomicBoolean misconfiguredPerNodeMaxSizeWarningLogged
public EvictionChecker(MemoryInfoAccessor givenMemoryInfoAccessor, MapServiceContext mapServiceContext)
public boolean checkEvictable(RecordStore recordStore)
protected boolean checkPerNodeEviction(RecordStore recordStore)
public double translatePerNodeSizeToPartitionSize(RecordStore recordStore)
PER_NODE
max-size-policy is used.protected boolean checkPerPartitionEviction(String mapName, MaxSizeConfig maxSizeConfig, int partitionId)
protected boolean checkHeapSizeEviction(String mapName, MaxSizeConfig maxSizeConfig)
protected boolean checkFreeHeapSizeEviction(MaxSizeConfig maxSizeConfig)
protected boolean checkHeapPercentageEviction(String mapName, MaxSizeConfig maxSizeConfig)
protected boolean checkFreeHeapPercentageEviction(MaxSizeConfig maxSizeConfig)
protected long getTotalMemory()
protected long getFreeMemory()
protected long getMaxMemory()
protected long getAvailableMemory()
protected long getUsedHeapInBytes(String mapName)
protected int getRecordStoreSize(String mapName, PartitionContainer partitionContainer)
protected long getRecordStoreHeapCost(String mapName, PartitionContainer partitionContainer)
protected boolean isOwnerOrBackup(int partitionId)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.