## net.dontdrinkandroot.cache.impl.disk.indexed
Class SerializableIndexedDiskCache

    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,Serializable>
                      net.dontdrinkandroot.cache.impl.disk.indexed.SerializableIndexedDiskCache

All Implemented Interfaces:
  Cache<Serializable,Serializable>, CustomTtlCache<Serializable,Serializable>

Direct Known Subclasses:
  BufferedSerializableIndexedDiskCache

    public class SerializableIndexedDiskCache

extends AbstractIndexedDiskCache<Serializable,Serializable>

Author:
  Philip W. Sorst <philip@sorst.net>

Field Summary

Fields inherited from class net.dontdrinkandroot.cache.impl.disk.indexed.AbstractIndexedDiskCache
`dataFile, indexFile, lockFile`

Fields inherited from interface net.dontdrinkandroot.cache.Cache
`UNLIMITED_IDLE_TIME`

Constructor Summary
`SerializableIndexedDiskCache(String name, long defaultTimeToLive, ExpungeStrategy expungeStrategy, File baseDir)`
`SerializableIndexedDiskCache(String name, long defaultTimeToLive, File baseDir)`
`SerializableIndexedDiskCache(String name, long defaultTimeToLive, long defaultMaxIdleTime, ExpungeStrategy expungeStrategy, File baseDir)`
`SerializableIndexedDiskCache(String name, long defaultTimeToLive, long defaultMaxIdleTime, File baseDir)`

Method Summary

`

`<T extends Serializable> T`

`

`dataFromBytes(byte[] dataBytes)`

`

`<T extends Serializable> byte[]`

`

`dataToBytes(T data)`

`int` `getDataFileNumAllocatedBlocks()`
`int` `getIndexFileNumAllocatedBlocks()`

Methods inherited from class net.dontdrinkandroot.cache.impl.disk.indexed.AbstractIndexedDiskCache
`buildIndex, close, doDelete, doGet, doPut`

Methods inherited from class net.dontdrinkandroot.cache.impl.AbstractMapBackedCustomTtlCache
`doPut, put, put, putWithErrors, putWithErrors`

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 net.dontdrinkandroot.cache.impl.AbstractCache
`getCleanUpLogger, getDefaultMaxIdleTime, getDefaultTtl, getLogger, getName, setDefaultMaxIdleTime, setDefaultTtl`

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`

Constructor Detail

### SerializableIndexedDiskCache

    public SerializableIndexedDiskCache(String name,
                                        long defaultTimeToLive,
                                        File baseDir)
                                 throws IOException

Throws:
  `IOException`

### SerializableIndexedDiskCache

    public SerializableIndexedDiskCache(String name,
                                        long defaultTimeToLive,
                                        long defaultMaxIdleTime,
                                        File baseDir)
                                 throws IOException

Throws:
  `IOException`

### SerializableIndexedDiskCache

    public SerializableIndexedDiskCache(String name,
                                        long defaultTimeToLive,
                                        ExpungeStrategy expungeStrategy,
                                        File baseDir)
                                 throws IOException

Throws:
  `IOException`

### SerializableIndexedDiskCache

    public SerializableIndexedDiskCache(String name,
                                        long defaultTimeToLive,
                                        long defaultMaxIdleTime,
                                        ExpungeStrategy expungeStrategy,
                                        File baseDir)
                                 throws IOException

Throws:
  `IOException`

Method Detail

### dataToBytes

    public <T extends Serializable> byte[] dataToBytes(T data)
                       throws CacheException

  Specified by:
    `dataToBytes` in class `AbstractIndexedDiskCache<Serializable,Serializable>`
  Throws:
    `CacheException`

### dataFromBytes

    public <T extends Serializable> T dataFromBytes(byte[] dataBytes)
                                         throws CacheException

  Specified by:
    `dataFromBytes` in class `AbstractIndexedDiskCache<Serializable,Serializable>`
  Throws:
    `CacheException`

### getIndexFileNumAllocatedBlocks

    public int getIndexFileNumAllocatedBlocks()

### getDataFileNumAllocatedBlocks

    public int getDataFileNumAllocatedBlocks()

Copyright © 2013 dontdrinkandroot. All Rights Reserved.