net.dontdrinkandroot.cache.impl.disk.indexed
Class ByteArrayIndexedDiskCache
java.lang.Object
net.dontdrinkandroot.cache.impl.AbstractCache<K,V>
net.dontdrinkandroot.cache.impl.AbstractMapBackedCache<K,V,M>
net.dontdrinkandroot.cache.impl.AbstractMapBackedCustomTtlCache<K,V,BlockMetaData>
net.dontdrinkandroot.cache.impl.disk.indexed.AbstractIndexedDiskCache<Serializable,byte[]>
net.dontdrinkandroot.cache.impl.disk.indexed.ByteArrayIndexedDiskCache
- All Implemented Interfaces:
- Cache<Serializable,byte[]>, CustomTtlCache<Serializable,byte[]>
public class ByteArrayIndexedDiskCache
- extends AbstractIndexedDiskCache<Serializable,byte[]>
- Author:
- Philip W. Sorst
| Methods inherited from class net.dontdrinkandroot.cache.impl.AbstractMapBackedCache |
cleanUp, delete, delete, expunge, get, getEntriesMetaData, getEntriesMetaDataMap, getExpungeStrategy, getMetaData, getStatistics, getWithErrors, put, putWithErrors, setEntriesMetaDataMap, setExpungeStrategy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.dontdrinkandroot.cache.Cache |
cleanUp, delete, get, getDefaultMaxIdleTime, getDefaultTtl, getMetaData, getName, getStatistics, getWithErrors, put, putWithErrors |
ByteArrayIndexedDiskCache
public ByteArrayIndexedDiskCache(String name,
long defaultTimeToLive,
ExpungeStrategy expungeStrategy,
File baseDir)
throws IOException
- Throws:
IOException
ByteArrayIndexedDiskCache
public ByteArrayIndexedDiskCache(String name,
long defaultTimeToLive,
long defaultMaxIdleTime,
ExpungeStrategy expungeStrategy,
File baseDir)
throws IOException
- Throws:
IOException
dataToBytes
public byte[] dataToBytes(byte[] data)
throws CacheException
- Specified by:
dataToBytes in class AbstractIndexedDiskCache<Serializable,byte[]>
- Throws:
CacheException
dataFromBytes
public byte[] dataFromBytes(byte[] data)
throws CacheException
- Specified by:
dataFromBytes in class AbstractIndexedDiskCache<Serializable,byte[]>
- Throws:
CacheException
getMetaFileNumAllocatedBlocks
public int getMetaFileNumAllocatedBlocks()
getDataFileNumAllocatedBlocks
public int getDataFileNumAllocatedBlocks()
assertAllocatedConsistency
public boolean assertAllocatedConsistency()
Copyright © 2013 dontdrinkandroot. All Rights Reserved.