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
 Cache<K,V> addChild(java.lang.String name)
           
 void addListener(CacheListener listener)
          
 void clear()
           
 V get(K key)
           
 Cache<K,V> getChild(java.lang.String name)
           
 java.util.List<Cache> getChildren()
           
 java.lang.String getName()
           
protected  org.jboss.cache.Node<K,V> getRootNode()
           
 java.util.Set<K> keySet()
           
 V put(K key, V value)
           
 V put(K key, V value, java.lang.Long ttl)
           
 V remove(K key)
           
 boolean removeChild(java.lang.String name)
           
 void removeListener()
           
 int size()
           
 java.util.Collection<V> values()
           
 
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>

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>

keySet

public java.util.Set<K> keySet()

size

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

clear

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

values

public java.util.Collection<V> values()

addListener

public void addListener(CacheListener listener)


removeListener

public void removeListener()

addChild

public Cache<K,V> addChild(java.lang.String name)

getChild

public Cache<K,V> getChild(java.lang.String name)

getRootNode

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

getChildren

public java.util.List<Cache> getChildren()

removeChild

public boolean removeChild(java.lang.String name)

getName

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


Copyright © 2010. All Rights Reserved.