org.terracotta.modules.ehcache.store.nonstop
Class ExceptionOnTimeoutStore

java.lang.Object
  extended by org.terracotta.modules.ehcache.store.nonstop.ExceptionOnTimeoutStore
All Implemented Interfaces:
Store, TerracottaStore

public final class ExceptionOnTimeoutStore
extends Object
implements TerracottaStore

Implementation of NonstopStore that throws NonStopCacheException for all operations.

Author:
Abhishek Sanoujam

Field Summary
 
Fields inherited from interface net.sf.ehcache.store.Store
CLUSTER_COHERENT, NODE_COHERENT
 
Method Summary
 void addStoreListener(StoreListener listener)
          .
 boolean bufferFull()
          .
 boolean containsKey(Object key)
          .
 boolean containsKeyInMemory(Object key)
          .
 boolean containsKeyOffHeap(Object key)
          .
 boolean containsKeyOnDisk(Object key)
          .
 WriteBehind createWriteBehind()
           
 void dispose()
          .
 Results executeQuery(StoreQuery query)
          .
 void expireElements()
          .
 void flush()
          .
 Element get(Object key)
          .
 Map<Object,Element> getAll(Collection<?> keys)
          
 Map<Object,Element> getAllQuiet(Collection<?> keys)
          
 Policy getInMemoryEvictionPolicy()
          .
 int getInMemorySize()
          .
 long getInMemorySizeInBytes()
          .
static ExceptionOnTimeoutStore getInstance()
          returns the singleton instance
 Object getInternalContext()
          .
 List getKeys()
          .
 Set getLocalKeys()
          
 Object getMBean()
          .
 int getOffHeapSize()
          .
 long getOffHeapSizeInBytes()
          .
 int getOnDiskSize()
          .
 long getOnDiskSizeInBytes()
          .
 Element getQuiet(Object key)
          
<T> Attribute<T>
getSearchAttribute(String attributeName)
          .
 int getSize()
          .
 Status getStatus()
          .
 int getTerracottaClusteredSize()
          .
 CacheConfiguration.TransactionalMode getTransactionalMode()
          
 boolean hasAbortedSizeOf()
          .
 boolean isCacheCoherent()
          .
 boolean isClusterCoherent()
          .
 boolean isNodeCoherent()
          .
 boolean put(Element element)
          .
 void putAll(Collection<Element> elements)
          .
 Element putIfAbsent(Element element)
          .
 boolean putWithWriter(Element element, CacheWriterManager writerManager)
          .
 void recalculateSize(Object key)
          
 Element remove(Object key)
          .
 void removeAll()
          .
 void removeAll(Collection<?> keys)
          .
 Element removeElement(Element element, ElementValueComparator comparator)
          .
 void removeStoreListener(StoreListener listener)
          .
 Element removeWithWriter(Object key, CacheWriterManager writerManager)
          .
 Element replace(Element element)
          .
 boolean replace(Element old, Element element, ElementValueComparator comparator)
          .
 void setAttributeExtractors(Map<String,AttributeExtractor> extractors)
          .
 void setInMemoryEvictionPolicy(Policy policy)
          .
 void setNodeCoherent(boolean coherent)
          .
 Element unlockedGet(Object key)
          
 Element unlockedGetQuiet(Object key)
          
 Element unsafeGet(Object key)
          
 Element unsafeGetQuiet(Object key)
          
 void waitUntilClusterCoherent()
          .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ExceptionOnTimeoutStore getInstance()
returns the singleton instance


get

public Element get(Object key)
            throws IllegalStateException,
                   CacheException
.

Throws NonStopCacheException

Specified by:
get in interface Store
Throws:
IllegalStateException
CacheException

getQuiet

public Element getQuiet(Object key)
                 throws IllegalStateException,
                        CacheException

Specified by:
getQuiet in interface Store
Throws:
IllegalStateException
CacheException

getAllQuiet

public Map<Object,Element> getAllQuiet(Collection<?> keys)

Throws NonStopCacheException

Specified by:
getAllQuiet in interface Store

getAll

public Map<Object,Element> getAll(Collection<?> keys)

Throws NonStopCacheException

Specified by:
getAll in interface Store

getKeys

public List getKeys()
             throws IllegalStateException,
                    CacheException
.

Throws NonStopCacheException

Specified by:
getKeys in interface Store
Throws:
IllegalStateException
CacheException

put

public boolean put(Element element)
            throws IllegalArgumentException,
                   IllegalStateException,
                   CacheException
.

Throws NonStopCacheException

Specified by:
put in interface Store
Throws:
IllegalArgumentException
IllegalStateException
CacheException

putAll

public void putAll(Collection<Element> elements)
            throws CacheException
.

Throws NonStopCacheException

Specified by:
putAll in interface Store
Throws:
CacheException

remove

public Element remove(Object key)
               throws IllegalStateException
.

Throws NonStopCacheException

Specified by:
remove in interface Store
Throws:
IllegalStateException

removeAll

public void removeAll(Collection<?> keys)
               throws IllegalStateException
.

Throws NonStopCacheException

Specified by:
removeAll in interface Store
Throws:
IllegalStateException

removeAll

public void removeAll()
               throws IllegalStateException,
                      CacheException
.

Throws NonStopCacheException

Specified by:
removeAll in interface Store
Throws:
IllegalStateException
CacheException

flush

public void flush()
           throws IllegalStateException,
                  CacheException
.

Throws NonStopCacheException

Specified by:
flush in interface Store
Throws:
IllegalStateException
CacheException

getInternalContext

public Object getInternalContext()
.

Throws NonStopCacheException

Specified by:
getInternalContext in interface Store

getSize

public int getSize()
            throws IllegalStateException,
                   CacheException
.

Throws NonStopCacheException

Specified by:
getSize in interface Store
Throws:
IllegalStateException
CacheException

putIfAbsent

public Element putIfAbsent(Element element)
                    throws NullPointerException
.

Throws NonStopCacheException

Specified by:
putIfAbsent in interface Store
Throws:
NullPointerException

replace

public Element replace(Element element)
                throws NullPointerException
.

Throws NonStopCacheException

Specified by:
replace in interface Store
Throws:
NullPointerException

addStoreListener

public void addStoreListener(StoreListener listener)
.

Throws NonStopCacheException

Specified by:
addStoreListener in interface Store

bufferFull

public boolean bufferFull()
.

Throws NonStopCacheException

Specified by:
bufferFull in interface Store

containsKey

public boolean containsKey(Object key)
.

Throws NonStopCacheException

Specified by:
containsKey in interface Store

containsKeyInMemory

public boolean containsKeyInMemory(Object key)
.

Throws NonStopCacheException

Specified by:
containsKeyInMemory in interface Store

containsKeyOffHeap

public boolean containsKeyOffHeap(Object key)
.

Throws NonStopCacheException

Specified by:
containsKeyOffHeap in interface Store

containsKeyOnDisk

public boolean containsKeyOnDisk(Object key)
.

Throws NonStopCacheException

Specified by:
containsKeyOnDisk in interface Store

dispose

public void dispose()
.

Throws NonStopCacheException

Specified by:
dispose in interface Store

executeQuery

public Results executeQuery(StoreQuery query)
.

Throws NonStopCacheException

Specified by:
executeQuery in interface Store

expireElements

public void expireElements()
.

Throws NonStopCacheException

Specified by:
expireElements in interface Store

getInMemoryEvictionPolicy

public Policy getInMemoryEvictionPolicy()
.

Throws NonStopCacheException

Specified by:
getInMemoryEvictionPolicy in interface Store

getInMemorySize

public int getInMemorySize()
.

Throws NonStopCacheException

Specified by:
getInMemorySize in interface Store

getInMemorySizeInBytes

public long getInMemorySizeInBytes()
.

Throws NonStopCacheException

Specified by:
getInMemorySizeInBytes in interface Store

getMBean

public Object getMBean()
.

Throws NonStopCacheException

Specified by:
getMBean in interface Store

getOffHeapSize

public int getOffHeapSize()
.

Throws NonStopCacheException

Specified by:
getOffHeapSize in interface Store

getOffHeapSizeInBytes

public long getOffHeapSizeInBytes()
.

Throws NonStopCacheException

Specified by:
getOffHeapSizeInBytes in interface Store

getOnDiskSize

public int getOnDiskSize()
.

Throws NonStopCacheException

Specified by:
getOnDiskSize in interface Store

getOnDiskSizeInBytes

public long getOnDiskSizeInBytes()
.

Throws NonStopCacheException

Specified by:
getOnDiskSizeInBytes in interface Store

hasAbortedSizeOf

public boolean hasAbortedSizeOf()
.

Throws NonStopCacheException

Specified by:
hasAbortedSizeOf in interface Store

getStatus

public Status getStatus()
.

Throws NonStopCacheException

Specified by:
getStatus in interface Store

getTerracottaClusteredSize

public int getTerracottaClusteredSize()
.

Throws NonStopCacheException

Specified by:
getTerracottaClusteredSize in interface Store

isCacheCoherent

public boolean isCacheCoherent()
.

Throws NonStopCacheException

Specified by:
isCacheCoherent in interface Store

isClusterCoherent

public boolean isClusterCoherent()
.

Throws NonStopCacheException

Specified by:
isClusterCoherent in interface Store

isNodeCoherent

public boolean isNodeCoherent()
.

Throws NonStopCacheException

Specified by:
isNodeCoherent in interface Store

putWithWriter

public boolean putWithWriter(Element element,
                             CacheWriterManager writerManager)
                      throws CacheException
.

Throws NonStopCacheException

Specified by:
putWithWriter in interface Store
Throws:
CacheException

removeElement

public Element removeElement(Element element,
                             ElementValueComparator comparator)
                      throws NullPointerException
.

Throws NonStopCacheException

Specified by:
removeElement in interface Store
Throws:
NullPointerException

removeStoreListener

public void removeStoreListener(StoreListener listener)
.

Throws NonStopCacheException

Specified by:
removeStoreListener in interface Store

removeWithWriter

public Element removeWithWriter(Object key,
                                CacheWriterManager writerManager)
                         throws CacheException
.

Throws NonStopCacheException

Specified by:
removeWithWriter in interface Store
Throws:
CacheException

replace

public boolean replace(Element old,
                       Element element,
                       ElementValueComparator comparator)
                throws NullPointerException,
                       IllegalArgumentException
.

Throws NonStopCacheException

Specified by:
replace in interface Store
Throws:
NullPointerException
IllegalArgumentException

setAttributeExtractors

public void setAttributeExtractors(Map<String,AttributeExtractor> extractors)
.

Throws NonStopCacheException

Specified by:
setAttributeExtractors in interface Store

setInMemoryEvictionPolicy

public void setInMemoryEvictionPolicy(Policy policy)
.

Throws NonStopCacheException

Specified by:
setInMemoryEvictionPolicy in interface Store

setNodeCoherent

public void setNodeCoherent(boolean coherent)
                     throws UnsupportedOperationException
.

Throws NonStopCacheException

Specified by:
setNodeCoherent in interface Store
Throws:
UnsupportedOperationException

waitUntilClusterCoherent

public void waitUntilClusterCoherent()
                              throws UnsupportedOperationException
.

Throws NonStopCacheException

Specified by:
waitUntilClusterCoherent in interface Store
Throws:
UnsupportedOperationException

getSearchAttribute

public <T> Attribute<T> getSearchAttribute(String attributeName)
.

Throws NonStopCacheException

Specified by:
getSearchAttribute in interface Store

getLocalKeys

public Set getLocalKeys()

Specified by:
getLocalKeys in interface TerracottaStore

getTransactionalMode

public CacheConfiguration.TransactionalMode getTransactionalMode()

Specified by:
getTransactionalMode in interface TerracottaStore

unlockedGet

public Element unlockedGet(Object key)


unlockedGetQuiet

public Element unlockedGetQuiet(Object key)


unsafeGet

public Element unsafeGet(Object key)

Specified by:
unsafeGet in interface TerracottaStore

unsafeGetQuiet

public Element unsafeGetQuiet(Object key)


recalculateSize

public void recalculateSize(Object key)

Specified by:
recalculateSize in interface Store

createWriteBehind

public WriteBehind createWriteBehind()
Specified by:
createWriteBehind in interface TerracottaStore


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