Top Description Constructors Methods
net.sf.ehcache.store

public final Class TerracottaTransactionalCopyingCacheStore

extends AbstractCopyingCacheStore<TerracottaStore>
implements TerracottaStore
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.store.TerracottaStore, net.sf.ehcache.store.Store
Imports
net.sf.ehcache.Element, net.sf.ehcache.config.CacheConfiguration, net.sf.ehcache.store.compound.ReadWriteCopyStrategy, net.sf.ehcache.writer.writebehind.WriteBehind, java.util.Set

A copying cache store designed for transactional terracotta clustered stores
Author
ljacomet

Constructor Summary

AccessConstructor and Description
public
TerracottaTransactionalCopyingCacheStore(TerracottaStore
the real store
store
,
ReadWriteCopyStrategy<Element>
the copy strategy to use on every copy operation
copyStrategyInstance
,
ClassLoader
classloader of the containing cache
loader
)

Creates a terracotta copying instance of store, that wraps the actual storage

Method Summary

Modifier and TypeMethod and Description
public WriteBehind
public Set<E>
getLocalKeys()

Implements net.sf.ehcache.store.TerracottaStore.getLocalKeys.

Returns set of keys from the cache which are present in the node locally.
public CacheConfiguration.TransactionalMode
getTransactionalMode()

Implements net.sf.ehcache.store.TerracottaStore.getTransactionalMode.

Get the transactional mode of this store.
public void
notifyCacheEventListenersChanged()

Implements net.sf.ehcache.store.TerracottaStore.notifyCacheEventListenersChanged.

Notify the underlying store that some change has occured in the set of registered cache listeners.
public void
quickClear()

Implements net.sf.ehcache.store.TerracottaStore.quickClear.

Remove all the contents of the store.
public int
quickSize()

Implements net.sf.ehcache.store.TerracottaStore.quickSize.

Get an approximate count of elements in the store.
public Element
unsafeGet(Object
the key
key
)

Implements net.sf.ehcache.store.TerracottaStore.unsafeGet.

Returns the local value associated with the key.
Inherited from net.sf.ehcache.store.AbstractCopyingCacheStore:
addStoreListenerbufferFullcontainsKeycontainsKeyInMemorycontainsKeyOffHeapcontainsKeyOnDiskdisposeexecuteQueryexpireElementsflushgetgetAllgetAllQuietgetCopyStrategyHandlergetInMemoryEvictionPolicygetInMemorySizegetInMemorySizeInBytesgetInternalContextgetKeysgetMBeangetOffHeapSizegetOffHeapSizeInBytesgetOnDiskSizegetOnDiskSizeInBytesgetQuietgetSearchAttributegetSearchAttributesgetSizegetStatusgetTerracottaClusteredSizegetUnderlyingStorehasAbortedSizeOfisCacheCoherentisClusterCoherentisNodeCoherentputputAllputIfAbsentputWithWriterrecalculateSizeremoveremoveAllremoveAllremoveElementremoveStoreListenerremoveWithWriterreplacereplacesetAttributeExtractorssetInMemoryEvictionPolicysetNodeCoherentwaitUntilClusterCoherent

Constructor Detail

TerracottaTransactionalCopyingCacheStoreback to summary
public TerracottaTransactionalCopyingCacheStore(TerracottaStore store, ReadWriteCopyStrategy<Element> copyStrategyInstance, ClassLoader loader)

Creates a terracotta copying instance of store, that wraps the actual storage

Parameters
store:TerracottaStore

the real store

copyStrategyInstance:ReadWriteCopyStrategy<Element>

the copy strategy to use on every copy operation

loader:ClassLoader

classloader of the containing cache

Method Detail

createWriteBehindback to summary
public WriteBehind createWriteBehind()

Implements net.sf.ehcache.store.TerracottaStore.createWriteBehind.

Doc from net.sf.ehcache.store.TerracottaStore.createWriteBehind.

WriteBehind createWriteBehind

Annotations
@Override
getLocalKeysback to summary
public Set<E> getLocalKeys()

Implements net.sf.ehcache.store.TerracottaStore.getLocalKeys.

Doc from net.sf.ehcache.store.TerracottaStore.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

Annotations
@Override
getTransactionalModeback to summary
public CacheConfiguration.TransactionalMode getTransactionalMode()

Implements net.sf.ehcache.store.TerracottaStore.getTransactionalMode.

Doc from net.sf.ehcache.store.TerracottaStore.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.

Annotations
@Override
notifyCacheEventListenersChangedback to summary
public void notifyCacheEventListenersChanged()

Implements net.sf.ehcache.store.TerracottaStore.notifyCacheEventListenersChanged.

Doc from net.sf.ehcache.store.TerracottaStore.notifyCacheEventListenersChanged.

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

Annotations
@Override
quickClearback to summary
public void quickClear()

Implements net.sf.ehcache.store.TerracottaStore.quickClear.

Doc from net.sf.ehcache.store.TerracottaStore.quickClear.

Remove all the contents of the store.

Annotations
@Override
quickSizeback to summary
public int quickSize()

Implements net.sf.ehcache.store.TerracottaStore.quickSize.

Doc from net.sf.ehcache.store.TerracottaStore.quickSize.

Get an approximate count of elements in the store.

Returns:int

an approximate count of elements in the store.

Annotations
@Override
unsafeGetback to summary
public Element unsafeGet(Object key)

Implements net.sf.ehcache.store.TerracottaStore.unsafeGet.

Doc from net.sf.ehcache.store.TerracottaStore.unsafeGet.

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

Annotations
@Override