|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.store.AbstractStore
net.sf.ehcache.store.compound.CompoundStore
net.sf.ehcache.store.compound.impl.MemoryOnlyStore
public final class MemoryOnlyStore
Implements a memory only store.
| Field Summary |
|---|
| Fields inherited from interface net.sf.ehcache.store.Store |
|---|
CLUSTER_COHERENT, NODE_COHERENT |
| Method Summary | ||
|---|---|---|
boolean |
bufferFull()
Some store types, such as the disk stores can fill their write buffers if puts come in too fast. |
|
boolean |
containsKeyInMemory(Object key)
A check to see if a key is in the Store and is currently held in memory. |
|
boolean |
containsKeyOffHeap(Object key)
A check to see if a key is in the Store and is currently held off-heap. |
|
boolean |
containsKeyOnDisk(Object key)
A check to see if a key is in the Store and is currently held on disk. |
|
static MemoryOnlyStore |
create(Cache cache,
String diskStorePath)
Constructs an in-memory store for the given cache, using the given disk path. |
|
void |
deregistered(CacheConfiguration config)
Indicates that this listener was removed from the given configuration |
|
void |
diskCapacityChanged(int oldCapacity,
int newCapacity)
Indicates a change in the configurations disk store capacity |
|
Results |
executeQuery(StoreQuery query)
Execute the given query on this store |
|
void |
expireElements()
Expire all elements. |
|
void |
flush()
Flush elements to persistent store. |
|
Policy |
getInMemoryEvictionPolicy()
|
|
int |
getInMemorySize()
Returns the current local in-memory store size |
|
long |
getInMemorySizeInBytes()
Gets the size of the in-memory portion of the store, in bytes. |
|
Object |
getMBean()
Optional implementation specific MBean exposed by the store. |
|
int |
getOffHeapSize()
Returns the current local off-heap store size |
|
long |
getOffHeapSizeInBytes()
Gets the size of the off-heap portion of the store, in bytes. |
|
int |
getOnDiskSize()
Returns the current local on-disk store size |
|
long |
getOnDiskSizeInBytes()
Gets the size of the on-disk portion of the store, in bytes. |
|
|
getSearchAttribute(String attributeName)
Retrieve the given named search attribute |
|
int |
getTerracottaClusteredSize()
Returns the current Terracotta clustered store size |
|
void |
loggingChanged(boolean oldValue,
boolean newValue)
Indicates a change in the configuration for enable/disable logging |
|
void |
memoryCapacityChanged(int oldCapacity,
int newCapacity)
Indicates a change in the configurations memory store capacity |
|
void |
registered(CacheConfiguration config)
Indicates that this listener was registered with the given configuration |
|
void |
setAttributeExtractors(Map<String,AttributeExtractor> extractors)
Inform this store of the configured attribute extractors. |
|
void |
setInMemoryEvictionPolicy(Policy policy)
Sets the eviction policy strategy. |
|
void |
timeToIdleChanged(long oldTimeToIdle,
long newTimeToIdle)
Indicates a change in the configurations time to idle |
|
void |
timeToLiveChanged(long oldTimeToLive,
long newTimeToLive)
Indicates a change in the configurations time to live |
|
| Methods inherited from class net.sf.ehcache.store.compound.CompoundStore |
|---|
containsKey, dispose, elementSet, evict, fault, get, getInternalContext, getKeys, getQuiet, getRandomSample, getSize, getStatus, keySet, put, putIfAbsent, putRawIfAbsent, putWithWriter, remove, removeAll, removeElement, removeWithWriter, replace, replace, tryFault, unretrievedGet |
| Methods inherited from class net.sf.ehcache.store.AbstractStore |
|---|
addStoreListener, getEventListenerList, isCacheCoherent, isClusterCoherent, isNodeCoherent, removeStoreListener, setNodeCoherent, waitUntilClusterCoherent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MemoryOnlyStore create(Cache cache,
String diskStorePath)
cache - cache that fronts this storediskStorePath - disk path to store data in
public boolean bufferFull()
bufferFull in interface Storepublic boolean containsKeyInMemory(Object key)
containsKeyInMemory in interface Storekey - The Element key
public boolean containsKeyOffHeap(Object key)
containsKeyOffHeap in interface Storekey - The Element key
public boolean containsKeyOnDisk(Object key)
containsKeyOnDisk in interface Storekey - The Element key
public void expireElements()
expireElements in interface Store
public void flush()
throws IOException
flush in interface StoreIOException - if any IO error occurspublic Policy getInMemoryEvictionPolicy()
getInMemoryEvictionPolicy in interface StoreStore.setInMemoryEvictionPolicy(Policy)public int getInMemorySize()
getInMemorySize in interface Storepublic long getInMemorySizeInBytes()
getInMemorySizeInBytes in interface Storepublic int getOnDiskSize()
getOnDiskSize in interface Storepublic long getOnDiskSizeInBytes()
getOnDiskSizeInBytes in interface Storepublic int getOffHeapSize()
getOffHeapSize in interface Storepublic long getOffHeapSizeInBytes()
getOffHeapSizeInBytes in interface Storepublic int getTerracottaClusteredSize()
getTerracottaClusteredSize in interface Storepublic void setInMemoryEvictionPolicy(Policy policy)
setInMemoryEvictionPolicy in interface Storepolicy - the new policypublic void deregistered(CacheConfiguration config)
deregistered in interface CacheConfigurationListener
public void diskCapacityChanged(int oldCapacity,
int newCapacity)
diskCapacityChanged in interface CacheConfigurationListeneroldCapacity - previous capacitynewCapacity - new capacity
public void loggingChanged(boolean oldValue,
boolean newValue)
loggingChanged in interface CacheConfigurationListeneroldValue - old value whether logging was enabled or notnewValue - new value whether logging was enabled or not
public void memoryCapacityChanged(int oldCapacity,
int newCapacity)
memoryCapacityChanged in interface CacheConfigurationListeneroldCapacity - previous capacitynewCapacity - new capacitypublic void registered(CacheConfiguration config)
registered in interface CacheConfigurationListener
public void timeToIdleChanged(long oldTimeToIdle,
long newTimeToIdle)
timeToIdleChanged in interface CacheConfigurationListeneroldTimeToIdle - previous time to idle valuenewTimeToIdle - new time to idle value
public void timeToLiveChanged(long oldTimeToLive,
long newTimeToLive)
timeToLiveChanged in interface CacheConfigurationListeneroldTimeToLive - previous time to live valuenewTimeToLive - new time to live valuepublic Object getMBean()
getMBean in interface Storepublic void setAttributeExtractors(Map<String,AttributeExtractor> extractors)
setAttributeExtractors in interface StoresetAttributeExtractors in class AbstractStorepublic Results executeQuery(StoreQuery query)
executeQuery in interface StoreexecuteQuery in class AbstractStorequery - query to execute
public <T> Attribute<T> getSearchAttribute(String attributeName)
throws CacheException
getSearchAttribute in interface StoregetSearchAttribute in class AbstractStoreT - type of the attributeattributeName - the name of the attribute to retrieve
CacheException
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||