|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.cache.jboss.JBossCache<K,V>
public class JBossCache<K,V>
Implementation of Cache using JBoss Cache
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.teiid.cache.Cache |
|---|
Cache.Type |
| Field Summary | |
|---|---|
protected JBossCacheListener |
cacheListener
|
protected org.jboss.cache.Cache<K,V> |
cacheStore
|
protected CacheConfiguration |
config
|
protected org.jboss.cache.Fqn |
rootFqn
|
| Constructor Summary | |
|---|---|
JBossCache(org.jboss.cache.Cache<K,V> cacheStore,
org.jboss.cache.Fqn fqn)
|
|
| Method Summary | |
|---|---|
void |
addListener(CacheListener listener)
|
void |
clear()
Removes all the keys and their values from the Cache |
V |
get(K key)
Retrieves the value for the given Key |
protected org.jboss.cache.Fqn<java.lang.String> |
getFqn(K key)
|
java.lang.String |
getName()
Name of the cache node |
protected org.jboss.cache.Node<K,V> |
getRootNode()
|
java.util.Set<K> |
keys()
Return all the keys |
V |
put(K key,
V value)
|
V |
put(K key,
V value,
java.lang.Long ttl)
Associates the specified value with the specified key this cache. |
V |
remove(K key)
Removes the value for this key from a Cache. |
void |
removeListener()
|
int |
size()
Size of the cache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.jboss.cache.Cache<K,V> cacheStore
protected org.jboss.cache.Fqn rootFqn
protected JBossCacheListener cacheListener
protected CacheConfiguration config
| Constructor Detail |
|---|
public JBossCache(org.jboss.cache.Cache<K,V> cacheStore,
org.jboss.cache.Fqn fqn)
| Method Detail |
|---|
public V get(K key)
Cache
get in interface Cache<K,V>key - key under which value is to be retrieved.
protected org.jboss.cache.Fqn<java.lang.String> getFqn(K key)
public V put(K key,
V value)
public V put(K key,
V value,
java.lang.Long ttl)
Cache
put in interface Cache<K,V>key - key with which the specified value is to be associated.value - value to be associated with the specified key.ttl - the time for this entry to live
null if there was no mapping for key.
A null return can also indicate that the key previously associated null with the specified key,
if the implementation supports null values.public V remove(K key)
Cachenull if the Key contained no mapping.
remove in interface Cache<K,V>key - key whose mapping is to be removed
public int size()
Cache
size in interface Cache<K,V>public void clear()
Cache
clear in interface Cache<K,V>public void addListener(CacheListener listener)
public void removeListener()
protected org.jboss.cache.Node<K,V> getRootNode()
public java.lang.String getName()
Cache
getName in interface Cache<K,V>public java.util.Set<K> keys()
Cache
keys in interface Cache<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||