public class EvictionCheckerImpl extends Object implements EvictionChecker
RecordStore
.Modifier and Type | Field and Description |
---|---|
protected ILogger |
logger |
protected MapServiceContext |
mapServiceContext |
protected MemoryInfoAccessor |
memoryInfoAccessor |
protected static double |
ONE_HUNDRED_PERCENT |
Constructor and Description |
---|
EvictionCheckerImpl(MemoryInfoAccessor givenMemoryInfoAccessor,
MapServiceContext mapServiceContext) |
Modifier and Type | Method and Description |
---|---|
double |
calculatePerNodeMaxRecordStoreSize(RecordStore recordStore)
Check whether the supplied record-store needs eviction.
|
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 |
getUsedHeapInBytes(String mapName) |
protected boolean |
isOwnerOrBackup(int partitionId) |
protected static final double ONE_HUNDRED_PERCENT
protected final ILogger logger
protected final MapServiceContext mapServiceContext
protected final MemoryInfoAccessor memoryInfoAccessor
public EvictionCheckerImpl(MemoryInfoAccessor givenMemoryInfoAccessor, 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)
recordStore
- the recordStoretrue
if eviction is required, false
otherwise.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 © 2016 Hazelcast, Inc.. All Rights Reserved.