org.teiid.cache.jboss
Class JBossCache<K,V>

java.lang.Object
  extended by org.teiid.cache.jboss.JBossCache<K,V>
All Implemented Interfaces:
Cache<K,V>
Direct Known Subclasses:
ExpirationAwareCache

public class JBossCache<K,V>
extends java.lang.Object
implements Cache<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()
           
 V get(K key)
           
protected  org.jboss.cache.Fqn<java.lang.String> getFqn(K key)
           
 java.lang.String getName()
           
protected  org.jboss.cache.Node<K,V> getRootNode()
           
 java.util.Set<K> keys()
           
 V put(K key, V value)
           
 V put(K key, V value, java.lang.Long ttl)
           
 V remove(K key)
           
 void removeListener()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheStore

protected org.jboss.cache.Cache<K,V> cacheStore

rootFqn

protected org.jboss.cache.Fqn rootFqn

cacheListener

protected JBossCacheListener cacheListener

config

protected CacheConfiguration config
Constructor Detail

JBossCache

public JBossCache(org.jboss.cache.Cache<K,V> cacheStore,
                  org.jboss.cache.Fqn fqn)
Method Detail

get

public V get(K key)
Specified by:
get in interface Cache<K,V>

getFqn

protected org.jboss.cache.Fqn<java.lang.String> getFqn(K key)

put

public V put(K key,
             V value)

put

public V put(K key,
             V value,
             java.lang.Long ttl)
Specified by:
put in interface Cache<K,V>

remove

public V remove(K key)
Specified by:
remove in interface Cache<K,V>

size

public int size()
Specified by:
size in interface Cache<K,V>

clear

public void clear()
Specified by:
clear in interface Cache<K,V>

addListener

public void addListener(CacheListener listener)

removeListener

public void removeListener()

getRootNode

protected org.jboss.cache.Node<K,V> getRootNode()

getName

public java.lang.String getName()
Specified by:
getName in interface Cache<K,V>

keys

public java.util.Set<K> keys()
Specified by:
keys in interface Cache<K,V>


Copyright © 2010. All Rights Reserved.