public class SmartByteBufferCache extends SmartLengthBasedCache<ByteBuffer>
Constructor and Description |
---|
SmartByteBufferCache(int maxCachedBufferLength,
double expungeRatio,
int expungeCount,
ISmartLengthBasedCacheCallback callback) |
Modifier and Type | Method and Description |
---|---|
protected ByteBuffer |
createResource(int length) |
static SmartByteBufferCache |
getDefaultSmartByteBufferCache() |
protected int |
getResourceCapacity(ByteBuffer resource) |
protected void |
prepareResource(ByteBuffer resource) |
protected void |
prepareResource(ByteBuffer resource,
int length) |
get, get, getLength, notifyUsedSize, set, toCacheCallback, tryCacheResource
public SmartByteBufferCache(int maxCachedBufferLength, double expungeRatio, int expungeCount, ISmartLengthBasedCacheCallback callback)
public static SmartByteBufferCache getDefaultSmartByteBufferCache()
protected ByteBuffer createResource(int length)
createResource
in class SmartLengthBasedCache<ByteBuffer>
protected void prepareResource(ByteBuffer resource)
prepareResource
in class SmartLengthBasedCache<ByteBuffer>
protected void prepareResource(ByteBuffer resource, int length)
prepareResource
in class SmartLengthBasedCache<ByteBuffer>
protected int getResourceCapacity(ByteBuffer resource)
getResourceCapacity
in class SmartLengthBasedCache<ByteBuffer>
Copyright © GigaSpaces.