public class MemoryBoundedResourcePool<T extends IMemoryAwareResource> extends ResourcePool<T> implements IMemoryAwareResourcePool
ResourcePool
which has memory boundaries, and it will not pool new
resources if the memory boundaries have reached.Constructor and Description |
---|
MemoryBoundedResourcePool(IMemoryAwareResourceFactory<T> resourceFactory,
int minResources,
int maxResources,
long poolMemoryBounds) |
Modifier and Type | Method and Description |
---|---|
protected long |
CalculateUsedMemory() |
boolean |
isLimitReached(long length) |
protected T |
tryAllocateNewPooledResource() |
availableResources, forAllResources, freeResource, getResource, getResource, handleFullPool, size
public MemoryBoundedResourcePool(IMemoryAwareResourceFactory<T> resourceFactory, int minResources, int maxResources, long poolMemoryBounds)
protected T tryAllocateNewPooledResource()
tryAllocateNewPooledResource
in class ResourcePool<T extends IMemoryAwareResource>
protected long CalculateUsedMemory()
public boolean isLimitReached(long length)
isLimitReached
in interface IMemoryAwareResourcePool
Copyright © GigaSpaces.