| Modifier and Type | Field and Description |
|---|---|
protected org.infinispan.AdvancedCache<K,V> |
cacheStore |
| Constructor and Description |
|---|
InfinispanCache(org.infinispan.Cache<K,V> cacheStore,
String cacheName,
ClassLoader classloader) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all the keys and their values from the Cache
|
V |
get(K key)
Retrieves the value for the given Key
|
String |
getName()
Name of the cache node
|
boolean |
isTransactional()
If the cache is transactional
|
Set<K> |
keySet()
Return all the keys
|
V |
put(K key,
V value) |
V |
put(K key,
V value,
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.
|
int |
size()
Size of the cache
|
public InfinispanCache(org.infinispan.Cache<K,V> cacheStore, String cacheName, ClassLoader classloader)
public boolean isTransactional()
CacheisTransactional in interface Cache<K,V>public V get(K key)
Cachepublic V put(K key, V value, Long ttl)
Cacheput 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 livenull 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.public int size()
Cachepublic void clear()
CacheCopyright © 2019. All rights reserved.