|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.modules.ehcache.store.ClusteredStore
public class ClusteredStore
| Field Summary | |
|---|---|
protected net.sf.ehcache.Ehcache |
cache
The cache this store is associated with. |
| Fields inherited from interface net.sf.ehcache.store.Store |
|---|
CLUSTER_COHERENT, NODE_COHERENT |
| Constructor Summary | |
|---|---|
ClusteredStore(net.sf.ehcache.Ehcache cache)
|
|
| Method Summary | |
|---|---|
void |
addStoreListener(net.sf.ehcache.store.StoreListener listener)
|
boolean |
bufferFull()
Memory stores are never backed up and always return false |
protected void |
clear()
|
void |
configChanged(String cacheName,
String configName,
Object oldValue,
Object newValue)
|
boolean |
containsKey(Object key)
|
boolean |
containsKeyInMemory(Object key)
|
boolean |
containsKeyOnDisk(Object key)
|
void |
deregistered(net.sf.ehcache.config.CacheConfiguration config)
|
protected static net.sf.ehcache.store.Policy |
determineEvictionPolicy(net.sf.ehcache.Ehcache cache)
Chooses the Policy from the cache configuration |
void |
diskCapacityChanged(int oldCapacity,
int newCapacity)
|
void |
dispose()
|
void |
expireElements()
Expire all elements. |
void |
fireClusterCoherent(boolean clusterCoherent)
|
void |
fireNodeCoherent(boolean nodeCoherent)
|
void |
flush()
|
Object |
generatePortableKeyFor(Object obj)
Generates a portable key for the supplied object. |
net.sf.ehcache.Element |
get(Object key)
|
net.sf.ehcache.store.Policy |
getInMemoryEvictionPolicy()
|
int |
getInMemorySize()
|
long |
getInMemorySizeInBytes()
|
Object |
getInternalContext()
|
Object[] |
getKeyArray()
This might return duplicate keys when in incoherent mode |
int |
getOnDiskSize()
|
long |
getOnDiskSizeInBytes()
|
net.sf.ehcache.Element |
getQuiet(Object key)
|
int |
getSize()
|
net.sf.ehcache.Status |
getStatus()
|
int |
getTerracottaClusteredSize()
|
void |
initalizeTransients(net.sf.ehcache.Ehcache ehcache)
This method is used for common on-load and instantiation logic. |
boolean |
isCacheCoherent()
|
boolean |
isClusterCoherent()
|
boolean |
isNodeCoherent()
returns true if the cache is coherent locally, or false otherwise This does not consider the state of the other nodes. |
void |
loggingChanged(boolean oldValue,
boolean newValue)
|
void |
memoryCapacityChanged(int oldCapacity,
int newCapacity)
|
boolean |
put(net.sf.ehcache.Element element)
|
net.sf.ehcache.Element |
putIfAbsent(net.sf.ehcache.Element element)
|
boolean |
putWithWriter(net.sf.ehcache.Element element,
net.sf.ehcache.writer.CacheWriterManager writerManager)
|
void |
registered(net.sf.ehcache.config.CacheConfiguration config)
|
net.sf.ehcache.Element |
remove(Object key)
|
void |
removeAll()
|
net.sf.ehcache.Element |
removeElement(net.sf.ehcache.Element element)
|
protected net.sf.ehcache.Element |
removeFromBackend(Object key)
|
void |
removeStoreListener(net.sf.ehcache.store.StoreListener listener)
|
net.sf.ehcache.Element |
removeWithWriter(Object key,
net.sf.ehcache.writer.CacheWriterManager writerManager)
|
net.sf.ehcache.Element |
replace(net.sf.ehcache.Element element)
|
boolean |
replace(net.sf.ehcache.Element old,
net.sf.ehcache.Element element)
|
void |
setInMemoryEvictionPolicy(net.sf.ehcache.store.Policy policy)
|
void |
setNodeCoherent(boolean coherent)
|
void |
timeToIdleChanged(long oldTti,
long newTti)
|
void |
timeToLiveChanged(long oldTtl,
long newTtl)
|
net.sf.ehcache.Element |
unlockedGet(Object key)
|
net.sf.ehcache.Element |
unlockedGetQuiet(Object key)
|
net.sf.ehcache.Element |
unsafeGet(Object key)
|
net.sf.ehcache.Element |
unsafeGetQuiet(Object key)
|
void |
waitUntilClusterCoherent()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected net.sf.ehcache.Ehcache cache
| Constructor Detail |
|---|
public ClusteredStore(net.sf.ehcache.Ehcache cache)
| Method Detail |
|---|
public void initalizeTransients(net.sf.ehcache.Ehcache ehcache)
TerracottaClusteredInstanceFactory through ManagerUtil call, as
opposed to the regular root declaration in DSO instrumented classes.
This approach is needed for 'express' features since none of the application context classes can be instrumented by
Terracotta due to the lack of a boot jar.
public boolean put(net.sf.ehcache.Element element)
throws net.sf.ehcache.CacheException
put in interface net.sf.ehcache.store.Storenet.sf.ehcache.CacheException
public boolean putWithWriter(net.sf.ehcache.Element element,
net.sf.ehcache.writer.CacheWriterManager writerManager)
throws net.sf.ehcache.CacheException
putWithWriter in interface net.sf.ehcache.store.Storenet.sf.ehcache.CacheExceptionpublic net.sf.ehcache.Element get(Object key)
get in interface net.sf.ehcache.store.Storepublic net.sf.ehcache.Element getQuiet(Object key)
getQuiet in interface net.sf.ehcache.store.Storepublic net.sf.ehcache.Element unlockedGet(Object key)
unlockedGet in interface net.sf.ehcache.store.TerracottaStorepublic net.sf.ehcache.Element unlockedGetQuiet(Object key)
unlockedGetQuiet in interface net.sf.ehcache.store.TerracottaStorepublic net.sf.ehcache.Element unsafeGet(Object key)
unsafeGet in interface net.sf.ehcache.store.TerracottaStorepublic net.sf.ehcache.Element unsafeGetQuiet(Object key)
unsafeGetQuiet in interface net.sf.ehcache.store.TerracottaStorepublic net.sf.ehcache.Element remove(Object key)
remove in interface net.sf.ehcache.store.Store
public net.sf.ehcache.Element removeWithWriter(Object key,
net.sf.ehcache.writer.CacheWriterManager writerManager)
throws net.sf.ehcache.CacheException
removeWithWriter in interface net.sf.ehcache.store.Storenet.sf.ehcache.CacheExceptionprotected net.sf.ehcache.Element removeFromBackend(Object key)
public final boolean bufferFull()
bufferFull in interface net.sf.ehcache.store.Storepublic final void expireElements()
expireElements in interface net.sf.ehcache.store.Storeprotected static final net.sf.ehcache.store.Policy determineEvictionPolicy(net.sf.ehcache.Ehcache cache)
cache - public boolean containsKey(Object key)
containsKey in interface net.sf.ehcache.store.Storepublic boolean containsKeyInMemory(Object key)
containsKeyInMemory in interface net.sf.ehcache.store.Storepublic boolean containsKeyOnDisk(Object key)
containsKeyOnDisk in interface net.sf.ehcache.store.Storepublic int getSize()
getSize in interface net.sf.ehcache.store.Storepublic int getInMemorySize()
getInMemorySize in interface net.sf.ehcache.store.Storepublic long getInMemorySizeInBytes()
getInMemorySizeInBytes in interface net.sf.ehcache.store.Storepublic int getOnDiskSize()
getOnDiskSize in interface net.sf.ehcache.store.Storepublic long getOnDiskSizeInBytes()
getOnDiskSizeInBytes in interface net.sf.ehcache.store.Storepublic int getTerracottaClusteredSize()
getTerracottaClusteredSize in interface net.sf.ehcache.store.Store
public void removeAll()
throws net.sf.ehcache.CacheException
removeAll in interface net.sf.ehcache.store.Storenet.sf.ehcache.CacheExceptionpublic net.sf.ehcache.Status getStatus()
getStatus in interface net.sf.ehcache.store.Storeprotected final void clear()
public void flush()
flush in interface net.sf.ehcache.store.Storepublic void dispose()
dispose in interface net.sf.ehcache.store.Storepublic Object[] getKeyArray()
getKeyArray in interface net.sf.ehcache.store.Storepublic Object generatePortableKeyFor(Object obj)
public net.sf.ehcache.store.Policy getInMemoryEvictionPolicy()
getInMemoryEvictionPolicy in interface net.sf.ehcache.store.Storepublic void setInMemoryEvictionPolicy(net.sf.ehcache.store.Policy policy)
setInMemoryEvictionPolicy in interface net.sf.ehcache.store.Storepublic Object getInternalContext()
getInternalContext in interface net.sf.ehcache.store.Storepublic boolean isCacheCoherent()
isCacheCoherent in interface net.sf.ehcache.store.Storepublic boolean isClusterCoherent()
isClusterCoherent in interface net.sf.ehcache.store.Storepublic boolean isNodeCoherent()
isNodeCoherent in interface net.sf.ehcache.store.Store
public void timeToIdleChanged(long oldTti,
long newTti)
timeToIdleChanged in interface net.sf.ehcache.config.CacheConfigurationListener
public void timeToLiveChanged(long oldTtl,
long newTtl)
timeToLiveChanged in interface net.sf.ehcache.config.CacheConfigurationListener
public void diskCapacityChanged(int oldCapacity,
int newCapacity)
diskCapacityChanged in interface net.sf.ehcache.config.CacheConfigurationListener
public void memoryCapacityChanged(int oldCapacity,
int newCapacity)
memoryCapacityChanged in interface net.sf.ehcache.config.CacheConfigurationListener
public void loggingChanged(boolean oldValue,
boolean newValue)
loggingChanged in interface net.sf.ehcache.config.CacheConfigurationListenerpublic void registered(net.sf.ehcache.config.CacheConfiguration config)
registered in interface net.sf.ehcache.config.CacheConfigurationListenerpublic void deregistered(net.sf.ehcache.config.CacheConfiguration config)
deregistered in interface net.sf.ehcache.config.CacheConfigurationListener
public void configChanged(String cacheName,
String configName,
Object oldValue,
Object newValue)
configChanged in interface ConfigChangeListenerpublic void setNodeCoherent(boolean coherent)
setNodeCoherent in interface net.sf.ehcache.store.Storepublic void waitUntilClusterCoherent()
waitUntilClusterCoherent in interface net.sf.ehcache.store.Storepublic void addStoreListener(net.sf.ehcache.store.StoreListener listener)
addStoreListener in interface net.sf.ehcache.store.Storepublic void removeStoreListener(net.sf.ehcache.store.StoreListener listener)
removeStoreListener in interface net.sf.ehcache.store.Storepublic void fireNodeCoherent(boolean nodeCoherent)
public void fireClusterCoherent(boolean clusterCoherent)
public net.sf.ehcache.Element putIfAbsent(net.sf.ehcache.Element element)
throws NullPointerException
putIfAbsent in interface net.sf.ehcache.store.StoreNullPointerException
public net.sf.ehcache.Element removeElement(net.sf.ehcache.Element element)
throws NullPointerException
removeElement in interface net.sf.ehcache.store.StoreNullPointerException
public boolean replace(net.sf.ehcache.Element old,
net.sf.ehcache.Element element)
throws NullPointerException,
IllegalArgumentException
replace in interface net.sf.ehcache.store.StoreNullPointerException
IllegalArgumentException
public net.sf.ehcache.Element replace(net.sf.ehcache.Element element)
throws NullPointerException
replace in interface net.sf.ehcache.store.StoreNullPointerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||