public class MemoryManager extends Object implements Closeable
Constructor and Description |
---|
MemoryManager(String spaceName,
String containerName,
AbstractCacheManager cacheManager,
LeaseManager leaseManager,
boolean isPrimary) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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 void monitorMemoryUsage(boolean isWriteTypeOperation) throws MemoryShortageException
isWriteTypeOperation
- is write operationMemoryShortageException
public boolean monitorMemoryUsageWithNoEviction(boolean isWriteTypeOperation)
isWriteTypeOperation
- true iff the space operation that triggered this check is write or
equivalent.public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © GigaSpaces.