public class VanillaMappedCache<T> extends Object implements Closeable
Constructor and Description |
---|
VanillaMappedCache() |
VanillaMappedCache(boolean cleanOnClose) |
VanillaMappedCache(int maximumCacheSize,
boolean releaseOnRemove) |
VanillaMappedCache(int maximumCacheSize,
boolean releaseOnRemove,
boolean cleanOnClose) |
VanillaMappedCache(int maximumCacheSize,
boolean releaseOnRemove,
boolean cleanOnClose,
FileLifecycleListener fileLifecycleListener) |
Modifier and Type | Method and Description |
---|---|
void |
checkCounts(int min,
int max) |
void |
close() |
VanillaMappedBytes |
get(T key) |
VanillaMappedBytes |
put(T key,
File path,
long size) |
VanillaMappedBytes |
put(T key,
File path,
long size,
long index) |
int |
size() |
public VanillaMappedCache()
public VanillaMappedCache(boolean cleanOnClose)
public VanillaMappedCache(int maximumCacheSize, boolean releaseOnRemove)
public VanillaMappedCache(int maximumCacheSize, boolean releaseOnRemove, boolean cleanOnClose)
public VanillaMappedCache(int maximumCacheSize, boolean releaseOnRemove, boolean cleanOnClose, FileLifecycleListener fileLifecycleListener)
maximumCacheSize
- the maximum number of VanillaMappedBytes to cachereleaseOnRemove
- release the VanillaMappedBytes when evicted from cachecleanOnClose
- clean the VanillaMappedBytes when evicted from cachefileLifecycleListener
- the file lifecyclepublic VanillaMappedBytes get(T key)
public VanillaMappedBytes put(T key, File path, long size) throws IOException
IOException
public VanillaMappedBytes put(T key, File path, long size, long index) throws IOException
IOException
public int size()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void checkCounts(int min, int max)
Copyright © 2019. All rights reserved.