Top Description Fields Methods
net.sf.ehcache.store

public Interface TerracottaStore

extends Store
Known Direct Implementers
net.sf.ehcache.store.TerracottaTransactionalCopyingCacheStore, net.sf.ehcache.transaction.AbstractTransactionStore
Imports
java.util.Set, net.sf.ehcache.Element, net.sf.ehcache.config.CacheConfiguration, net.sf.ehcache.writer.writebehind.WriteBehind

Use for internal purpose only. Teaser: Stores of Terracotta clustered caches implements this interface.
Author
Abhishek Sanoujam

Field Summary

Inherited from net.sf.ehcache.store.Store:
CLUSTER_COHERENTNODE_COHERENT

Method Summary

Modifier and TypeMethod and Description
public WriteBehind
createWriteBehind()

WriteBehind createWriteBehind

public Set<E>

Returns:

set of keys present locally in the node
getLocalKeys
()

Returns set of keys from the cache which are present in the node locally.

public CacheConfiguration.TransactionalMode

Returns:

a String representation of this store's transactional mode.
getTransactionalMode
()

Get the transactional mode of this store.

public void
notifyCacheEventListenersChanged()

Notify the underlying store that some change has occured in the set of registered cache listeners.

public void
quickClear()

Remove all the contents of the store.

public int

Returns:

an approximate count of elements in the store.
quickSize
()

Get an approximate count of elements in the store.

public Element

Returns:

the element associated with key or null
unsafeGet
(Object
the key
key
)

Returns the local value associated with the key.

Inherited from net.sf.ehcache.store.Store:
addStoreListenerbufferFullcontainsKeycontainsKeyInMemorycontainsKeyOffHeapcontainsKeyOnDiskdisposeexecuteQueryexpireElementsflushgetgetAllgetAllQuietgetInMemoryEvictionPolicygetInMemorySizegetInMemorySizeInBytesgetInternalContextgetKeysgetMBeangetOffHeapSizegetOffHeapSizeInBytesgetOnDiskSizegetOnDiskSizeInBytesgetQuietgetSearchAttributegetSearchAttributesgetSizegetStatusgetTerracottaClusteredSizehasAbortedSizeOfisCacheCoherentisClusterCoherentisNodeCoherentputputAllputIfAbsentputWithWriterrecalculateSizeremoveremoveAllremoveAllremoveElementremoveStoreListenerremoveWithWriterreplacereplacesetAttributeExtractorssetInMemoryEvictionPolicysetNodeCoherentwaitUntilClusterCoherent

Method Detail

createWriteBehindback to summary
public WriteBehind createWriteBehind()

WriteBehind createWriteBehind

getLocalKeysback to summary
public Set<E> getLocalKeys()

Returns set of keys from the cache which are present in the node locally.

Returns:Set<E>

set of keys present locally in the node

getTransactionalModeback to summary
public CacheConfiguration.TransactionalMode getTransactionalMode()

Get the transactional mode of this store. The returned value is the String value of CacheConfiguration.TransactionalMode.

Returns:CacheConfiguration.TransactionalMode

a String representation of this store's transactional mode.

See Also
net.sf.ehcache.config.CacheConfiguration.TransactionalMode
notifyCacheEventListenersChangedback to summary
public void notifyCacheEventListenersChanged()

Notify the underlying store that some change has occured in the set of registered cache listeners.

quickClearback to summary
public void quickClear()

Remove all the contents of the store.

quickSizeback to summary
public int quickSize()

Get an approximate count of elements in the store.

Returns:int

an approximate count of elements in the store.

unsafeGetback to summary
public Element unsafeGet(Object key)

Returns the local value associated with the key. Local value means that the object mapped to the key is present in the VM locally. In case its not, will return null. Note that even when returning null, the value may be present in the Terracotta server array.

This operation does not acquire any locks when doing the operation and may return stale values. This Operation does not update last usage statistics

Parameters
key:Object

the key

Returns:Element

the element associated with key or null