public class EvictionCheckerImpl extends Object implements EvictionChecker
MaxSizeConfig.MaxSizePolicy
to start eviction process.EvictorImpl.evictionChecker
Modifier and Type | Field and Description |
---|---|
protected MapServiceContext |
mapServiceContext |
protected MemoryInfoAccessor |
memoryInfoAccessor |
protected static int |
ONE_HUNDRED_PERCENT |
protected static int |
ONE_KILOBYTE |
protected static int |
ONE_MEGABYTE |
Constructor and Description |
---|
EvictionCheckerImpl(MapServiceContext mapServiceContext) |
Modifier and Type | Method and Description |
---|---|
double |
calculatePerNodeMaxRecordStoreSize(RecordStore recordStore)
Calculates and returns the expected maximum size of an evicted record-store
when
PER_NODE max-size-policy is used. |
boolean |
checkEvictionPossible(RecordStore recordStore)
Check whether the supplied record-store needs eviction.
|
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 |
getUsedHeapSize(String mapName) |
protected boolean |
isOwnerOrBackup(int partitionId) |
void |
setMemoryInfoAccessor(MemoryInfoAccessor memoryInfoAccessor) |
protected static final int ONE_HUNDRED_PERCENT
protected static final int ONE_KILOBYTE
protected static final int ONE_MEGABYTE
protected final MapServiceContext mapServiceContext
protected MemoryInfoAccessor memoryInfoAccessor
public EvictionCheckerImpl(MapServiceContext mapServiceContext)
public boolean checkEvictionPossible(RecordStore recordStore)
EvictionChecker
checkEvictionPossible
in interface EvictionChecker
recordStore
- the recordStoretrue
if eviction is required, false
otherwise.protected boolean checkPerNodeEviction(RecordStore recordStore)
public double calculatePerNodeMaxRecordStoreSize(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 getUsedHeapSize(String mapName)
protected int getRecordStoreSize(String mapName, PartitionContainer partitionContainer)
protected long getRecordStoreHeapCost(String mapName, PartitionContainer partitionContainer)
protected boolean isOwnerOrBackup(int partitionId)
public void setMemoryInfoAccessor(MemoryInfoAccessor memoryInfoAccessor)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.