ehcache

net.sf.ehcache.store
Class MemoryOnlyStore

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

public class MemoryOnlyStore
extends FrontEndCacheTier<NullStore,MemoryStore>

A memory-only store with support for all caching features.

Author:
Ludovic Orban

Nested Class Summary
protected static class MemoryOnlyStore.BruteForceSearchManager
          Brute force search implementation
 
Field Summary
 
Fields inherited from class net.sf.ehcache.store.FrontEndCacheTier
authority, cache
 
Fields inherited from class net.sf.ehcache.store.AbstractStore
attributeExtractors
 
Fields inherited from interface net.sf.ehcache.store.Store
CLUSTER_COHERENT, NODE_COHERENT
 
Constructor Summary
protected MemoryOnlyStore(CacheConfiguration cacheConfiguration, MemoryStore authority, SearchManager searchManager)
          Create a MemoryOnlyStore
 
Method Summary
static Store create(Ehcache cache, Pool onHeapPool)
          Create an instance of MemoryOnlyStore
 Policy getInMemoryEvictionPolicy()
          {inheritDoc}
 Object getMBean()
          Optional implementation specific MBean exposed by the store.
 void setInMemoryEvictionPolicy(Policy policy)
          {inheritDoc}
 
Methods inherited from class net.sf.ehcache.store.FrontEndCacheTier
bufferFull, containsKey, containsKeyInMemory, containsKeyOffHeap, containsKeyOnDisk, copyElementForReadIfNeeded, copyElementForWriteIfNeeded, dispose, expireElements, flush, get, getAllLocks, getInMemorySize, getInMemorySizeInBytes, getInternalContext, getKeys, getLockFor, getOffHeapSize, getOffHeapSizeInBytes, getOnDiskSize, getOnDiskSizeInBytes, getQuiet, getSize, getStatus, getTerracottaClusteredSize, hasAbortedSizeOf, isCached, isEvictionCandidate, isPinned, notifyEvictionFromCache, put, putIfAbsent, putWithWriter, recalculateSize, remove, removeAll, removeElement, removeWithWriter, replace, replace, 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
 

Constructor Detail

MemoryOnlyStore

protected MemoryOnlyStore(CacheConfiguration cacheConfiguration,
                          MemoryStore authority,
                          SearchManager searchManager)
Create a MemoryOnlyStore

Parameters:
cacheConfiguration - the cache configuration
authority - the memory store
Method Detail

create

public static Store create(Ehcache cache,
                           Pool onHeapPool)
Create an instance of MemoryOnlyStore

Parameters:
cache - the cache
onHeapPool - the on heap pool
Returns:
an instance of MemoryOnlyStore

setInMemoryEvictionPolicy

public void setInMemoryEvictionPolicy(Policy policy)
{inheritDoc}

Specified by:
setInMemoryEvictionPolicy in interface Store
Overrides:
setInMemoryEvictionPolicy in class FrontEndCacheTier<NullStore,MemoryStore>
Parameters:
policy - the new policy

getInMemoryEvictionPolicy

public Policy getInMemoryEvictionPolicy()
{inheritDoc}

Specified by:
getInMemoryEvictionPolicy in interface Store
Overrides:
getInMemoryEvictionPolicy in class FrontEndCacheTier<NullStore,MemoryStore>
Returns:
the current eviction policy. This may not be the configured policy, if it has been dynamically set.
See Also:
Store.setInMemoryEvictionPolicy(Policy)

getMBean

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

Returns:
implementation specific management bean

ehcache

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