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

    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
                          net.dontdrinkandroot.cache.impl.disk.indexed.BufferedSerializableIndexedDiskCache
                              net.dontdrinkandroot.cache.impl.disk.indexed.LruBufferedSerializableIndexedDiskCache

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

    public class LruBufferedSerializableIndexedDiskCache

extends BufferedSerializableIndexedDiskCache
implements LruBufferedCache<Serializable,Serializable>

A `BufferedSerializableIndexedDiskCache` that uses a `LruRecyclingExpungeStrategy` for both disk and buffer.

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

Field Summary

Fields inherited from class net.dontdrinkandroot.cache.impl.disk.indexed.BufferedSerializableIndexedDiskCache
`bufferExpungeStrategy`

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
`LruBufferedSerializableIndexedDiskCache(String name, long defaultTimeToLive, File baseDir, int size, int recycleSize, int bufferSize, int bufferRecycleSize)`
`LruBufferedSerializableIndexedDiskCache(String name, long defaultTimeToLive, long defaultMaxIdleTime, File baseDir, int size, int recycleSize, int bufferSize, int bufferRecycleSize)`

Method Summary
`int` `getBufferMaxSize()`
`int` `getBufferRecycleSize()`
`int` `getMaxSize()`
`int` `getRecycleSize()`
`void` `setBufferMaxSize(int maxSize)`
`void` `setBufferRecycleSize(int bufferRecycleSize)`
`void` `setExpungeStrategy(ExpungeStrategy expungeStrategy)`
`void` `setMaxSize(int maxSize)`
`void` `setRecycleSize(int recycleSize)`

Methods inherited from class net.dontdrinkandroot.cache.impl.disk.indexed.BufferedSerializableIndexedDiskCache
`copyData, doDelete, doGet, doPut, getBufferStatistics, isCopyOnRead, isCopyOnWrite, setCopyOnRead, setCopyOnWrite`

Methods inherited from class net.dontdrinkandroot.cache.impl.disk.indexed.SerializableIndexedDiskCache
`dataFromBytes, dataToBytes, getDataFileNumAllocatedBlocks, getIndexFileNumAllocatedBlocks`

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

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`

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

### LruBufferedSerializableIndexedDiskCache

    public LruBufferedSerializableIndexedDiskCache(String name,
                                                   long defaultTimeToLive,
                                                   File baseDir,
                                                   int size,
                                                   int recycleSize,
                                                   int bufferSize,
                                                   int bufferRecycleSize)
                                            throws IOException

Throws:
  `IOException`

### LruBufferedSerializableIndexedDiskCache

    public LruBufferedSerializableIndexedDiskCache(String name,
                                                   long defaultTimeToLive,
                                                   long defaultMaxIdleTime,
                                                   File baseDir,
                                                   int size,
                                                   int recycleSize,
                                                   int bufferSize,
                                                   int bufferRecycleSize)
                                            throws IOException

Throws:
  `IOException`

Method Detail

### setExpungeStrategy

    public void setExpungeStrategy(ExpungeStrategy expungeStrategy)

  Overrides:
    `setExpungeStrategy` in class `AbstractMapBackedCache<Serializable,Serializable,BlockMetaData>`

### getMaxSize

    public int getMaxSize()

  Specified by:
    `getMaxSize` in interface `LruCache<Serializable,Serializable>`

### setMaxSize

    public void setMaxSize(int maxSize)

  Specified by:
    `setMaxSize` in interface `LruCache<Serializable,Serializable>`

### getRecycleSize

    public int getRecycleSize()

  Specified by:
    `getRecycleSize` in interface `LruCache<Serializable,Serializable>`

### setRecycleSize

    public void setRecycleSize(int recycleSize)

  Specified by:
    `setRecycleSize` in interface `LruCache<Serializable,Serializable>`

### getBufferMaxSize

    public int getBufferMaxSize()

  Specified by:
    `getBufferMaxSize` in interface `LruBufferedCache<Serializable,Serializable>`

### setBufferMaxSize

    public void setBufferMaxSize(int maxSize)

  Specified by:
    `setBufferMaxSize` in interface `LruBufferedCache<Serializable,Serializable>`

### getBufferRecycleSize

    public int getBufferRecycleSize()

  Specified by:
    `getBufferRecycleSize` in interface `LruBufferedCache<Serializable,Serializable>`

### setBufferRecycleSize

    public void setBufferRecycleSize(int bufferRecycleSize)

  Specified by:
    `setBufferRecycleSize` in interface `LruBufferedCache<Serializable,Serializable>`

Copyright © 2013 dontdrinkandroot. All Rights Reserved.