org.infinispan.spring.provider
Class SpringCache<K,V>

java.lang.Object
  extended by org.infinispan.spring.provider.SpringCache<K,V>
All Implemented Interfaces:
org.springframework.cache.Cache<K,V>

public class SpringCache<K,V>
extends Object
implements org.springframework.cache.Cache<K,V>

A Cache implementation that delegates to a org.infinispan.Cache instance supplied at construction time.

Author:
Olaf Bergner

Constructor Summary
SpringCache(Cache<K,V> nativeCache)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 V get(Object key)
           
 String getName()
           
 Cache<K,V> getNativeCache()
           
 V put(K key, V value)
           
 V putIfAbsent(K key, V value)
           
 V remove(Object key)
           
 boolean remove(Object key, Object value)
           
 V replace(K key, V value)
           
 boolean replace(K key, V oldValue, V newValue)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpringCache

public SpringCache(Cache<K,V> nativeCache)
Parameters:
nativeCache -
Method Detail

getName

public String getName()
Specified by:
getName in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.getName()

getNativeCache

public Cache<K,V> getNativeCache()
Specified by:
getNativeCache in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.getNativeCache()

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.containsKey(java.lang.Object)

get

public V get(Object key)
Specified by:
get in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.get(java.lang.Object)

put

public V put(K key,
             V value)
Specified by:
put in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.put(java.lang.Object, java.lang.Object)

putIfAbsent

public V putIfAbsent(K key,
                     V value)
Specified by:
putIfAbsent in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.putIfAbsent(java.lang.Object, java.lang.Object)

remove

public V remove(Object key)
Specified by:
remove in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.remove(java.lang.Object)

remove

public boolean remove(Object key,
                      Object value)
Specified by:
remove in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.remove(java.lang.Object, java.lang.Object)

replace

public boolean replace(K key,
                       V oldValue,
                       V newValue)
Specified by:
replace in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.replace(java.lang.Object, java.lang.Object, java.lang.Object)

replace

public V replace(K key,
                 V value)
Specified by:
replace in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.replace(java.lang.Object, java.lang.Object)

clear

public void clear()
Specified by:
clear in interface org.springframework.cache.Cache<K,V>
See Also:
Cache.clear()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.