public class MemoryManager extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
MemoryManager.MemoryEvictionDecision
EVICTION DECISIONS.
|
| Constructor and Description |
|---|
MemoryManager(String spaceName,
String containerName,
AbstractCacheManager cacheManager,
LeaseManager leaseManager,
boolean isPrimary) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
getEvictionBatchSize()
return the eviction quota as defined
|
boolean |
isEnabled() |
boolean |
isRestartOnFailover() |
void |
monitorMemoryUsage(boolean isWriteTypeOperation)
check if we reached the memory-usage "watermark".
|
boolean |
monitorMemoryUsageWithNoEviction(boolean isWriteTypeOperation)
Perform all memory check but do not perform eviction, instead returns true if eviction should
be called this method will be used when loading cache in warm start with LRU mode in this
case if the memory limit reached loading of entries from the persistence storage should be
stopped instead of perform eviction and continue the cache loading.
|
public MemoryManager(String spaceName, String containerName, AbstractCacheManager cacheManager, LeaseManager leaseManager, boolean isPrimary)
public boolean isEnabled()
public boolean isRestartOnFailover()
public int getEvictionBatchSize()
public void monitorMemoryUsage(boolean isWriteTypeOperation)
throws MemoryShortageException
isWriteTypeOperation - is write operationMemoryShortageExceptionpublic boolean monitorMemoryUsageWithNoEviction(boolean isWriteTypeOperation)
isWriteTypeOperation - true iff the space operation that tirggerd this check is write or
equivalent.public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © GigaSpaces.