ehcache

net.sf.ehcache.store
Class DiskBackedMemoryStore

java.lang.Object
  extended by net.sf.ehcache.store.AbstractStore
      extended by net.sf.ehcache.store.FrontEndCacheTier<MemoryStore,DiskStore>
          extended by net.sf.ehcache.store.DiskBackedMemoryStore
All Implemented Interfaces:
Store

public final class DiskBackedMemoryStore
extends FrontEndCacheTier<MemoryStore,DiskStore>

A tiered store using an in-memory cache of elements stored on disk.

Author:
Ludovic Orban

Field Summary
 
Fields inherited from class net.sf.ehcache.store.FrontEndCacheTier
authority, cache
 
Fields inherited from interface net.sf.ehcache.store.Store
CLUSTER_COHERENT, NODE_COHERENT
 
Method Summary
static Store create(Ehcache cache, String diskStorePath, Pool onHeapPool, Pool onDiskPool)
          Create a DiskBackedMemoryStore instance
 Object getMBean()
          Optional implementation specific MBean exposed by the store.
 boolean notifyEvictionFromCache(Serializable key)
          Whether evicting this from the cache should fire when evicting from upper tiers
 
Methods inherited from class net.sf.ehcache.store.FrontEndCacheTier
bufferFull, containsKey, containsKeyInMemory, containsKeyOffHeap, containsKeyOnDisk, copyElementForReadIfNeeded, copyElementForWriteIfNeeded, dispose, expireElements, flush, get, getAllLocks, getInMemoryEvictionPolicy, getInMemorySize, getInMemorySizeInBytes, getInternalContext, getKeys, getLockFor, getOffHeapSize, getOffHeapSizeInBytes, getOnDiskSize, getOnDiskSizeInBytes, getQuiet, getSize, getStatus, getTerracottaClusteredSize, hasAbortedSizeOf, isCached, isEvictionCandidate, isPinned, put, putIfAbsent, putWithWriter, recalculateSize, remove, removeAll, removeElement, removeWithWriter, replace, replace, setInMemoryEvictionPolicy, setPinned, unpinAll
 
Methods inherited from class net.sf.ehcache.store.AbstractStore
addStoreListener, executeQuery, getAll, getAllQuiet, getEventListenerList, getSearchAttribute, isCacheCoherent, isClusterCoherent, isNodeCoherent, putAll, removeAll, removeStoreListener, setAttributeExtractors, setNodeCoherent, waitUntilClusterCoherent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Store create(Ehcache cache,
                           String diskStorePath,
                           Pool onHeapPool,
                           Pool onDiskPool)
Create a DiskBackedMemoryStore instance

Parameters:
cache - the cache
diskStorePath - the path to the folder in which files will be created
onHeapPool - the pool tracking on-heap usage
onDiskPool - the pool tracking on-disk usage
Returns:
a DiskBackedMemoryStore instance

getMBean

public Object getMBean()
Optional implementation specific MBean exposed by the store.

Returns:
implementation specific management bean

notifyEvictionFromCache

public boolean notifyEvictionFromCache(Serializable key)
Whether evicting this from the cache should fire when evicting from upper tiers

Overrides:
notifyEvictionFromCache in class FrontEndCacheTier<MemoryStore,DiskStore>
Parameters:
key - the key to the element
Returns:
true if we should fire, otherwise false

ehcache

Copyright © 2003-2012 Terracotta, Inc.. All Rights Reserved.