|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.CacheSupport<K,V>
org.infinispan.client.hotrod.impl.RemoteCacheSupport<K,V>
public abstract class RemoteCacheSupport<K,V>
Purpose: keep all delegating and unsupported methods in one place -> readability.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary |
|---|
| Fields inherited from class org.infinispan.CacheSupport |
|---|
defaultLifespan, defaultMaxIdleTime |
| Constructor Summary | |
|---|---|
RemoteCacheSupport()
|
|
| Method Summary | |
|---|---|
void |
addListener(Object listener)
Operation might be supported for smart clients that will be able to register for topology changes. |
void |
compact()
This operation is not supported. |
boolean |
containsValue(Object value)
|
void |
endBatch(boolean successful)
Completes a batch if one has been started using Cache.startBatch(). |
Set<Map.Entry<K,V>> |
entrySet()
Returns a set view of the mappings contained in this cache. |
void |
evict(K key)
Evicts an entry from the memory of the cache. |
AdvancedCache<K,V> |
getAdvancedCache()
This operation is not supported. |
CacheContainer |
getCacheManager()
Retrieves the cache manager responsible for creating this cache instance. |
Configuration |
getConfiguration()
|
Set<Object> |
getListeners()
|
ComponentStatus |
getStatus()
|
boolean |
isEmpty()
|
Set<K> |
keySet()
Returns a set view of the keys contained in this cache. |
void |
putForExternalRead(K key,
V value)
This operation is not supported. |
boolean |
remove(Object key,
Object value)
This operation is not supported. |
NotifyingFuture<Boolean> |
removeAsync(Object key,
Object value)
This operation is not supported. |
void |
removeListener(Object listener)
Removes a listener from the component. |
boolean |
replace(K key,
V oldValue,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
This operation is not supported. |
NotifyingFuture<Boolean> |
replaceAsync(K key,
V oldValue,
V newValue,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
This operation is not supported. |
boolean |
replaceWithVersion(K key,
V newValue,
long version)
Removes the given value only if its version matches the supplied version. |
boolean |
replaceWithVersion(K key,
V newValue,
long version,
int lifespanSeconds)
|
NotifyingFuture<Boolean> |
replaceWithVersionAsync(K key,
V newValue,
long version)
|
NotifyingFuture<Boolean> |
replaceWithVersionAsync(K key,
V newValue,
long version,
int lifespanSeconds)
|
int |
size()
|
boolean |
startBatch()
Starts a batch. |
Collection<V> |
values()
Returns a collection view of the values contained in this cache. |
| Methods inherited from class org.infinispan.CacheSupport |
|---|
put, put, putAll, putAll, putAllAsync, putAllAsync, putAsync, putAsync, putIfAbsent, putIfAbsent, putIfAbsentAsync, putIfAbsentAsync, replace, replace, replace, replace, replaceAsync, replaceAsync, replaceAsync, replaceAsync |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.infinispan.client.hotrod.RemoteCache |
|---|
getBulk, getBulk, getRemoteCacheManager, getVersioned, putAll, putAll, putAll, putAllAsync, putAllAsync, putAllAsync, removeWithVersion, removeWithVersionAsync, replace, replace, replaceAsync, replaceAsync, replaceWithVersion, replaceWithVersionAsync, stats, withFlags |
| Methods inherited from interface org.infinispan.Cache |
|---|
clearAsync, getName, getVersion, put, put, putAsync, putAsync, putAsync, putIfAbsent, putIfAbsent, putIfAbsentAsync, putIfAbsentAsync, putIfAbsentAsync, removeAsync, replace, replace, replaceAsync, replaceAsync, replaceAsync |
| Methods inherited from interface java.util.concurrent.ConcurrentMap |
|---|
putIfAbsent, replace |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, equals, get, hashCode, put, remove |
| Methods inherited from interface org.infinispan.lifecycle.Lifecycle |
|---|
start, stop |
| Constructor Detail |
|---|
public RemoteCacheSupport()
| Method Detail |
|---|
public NotifyingFuture<Boolean> replaceWithVersionAsync(K key,
V newValue,
long version)
replaceWithVersionAsync in interface RemoteCache<K,V>RemoteCache.replaceWithVersion(Object, Object, long)
public NotifyingFuture<Boolean> replaceWithVersionAsync(K key,
V newValue,
long version,
int lifespanSeconds)
replaceWithVersionAsync in interface RemoteCache<K,V>RemoteCache.replaceWithVersion(Object, Object, long)
public boolean replaceWithVersion(K key,
V newValue,
long version)
RemoteCacheRemoteCache.removeWithVersion(Object,
long) for a sample usage.
replaceWithVersion in interface RemoteCache<K,V>RemoteCache.getVersioned(Object),
VersionedValuepublic CacheContainer getCacheManager()
Cache
getCacheManager in interface Cache<K,V>
public boolean replaceWithVersion(K key,
V newValue,
long version,
int lifespanSeconds)
replaceWithVersion in interface RemoteCache<K,V>RemoteCache.replaceWithVersion(Object, Object, long)
public void putForExternalRead(K key,
V value)
RemoteCache
putForExternalRead in interface Cache<K,V>putForExternalRead in interface RemoteCache<K,V>key - key with which the specified value is to be associated.value - value to be associated with the specified key.public void addListener(Object listener)
RemoteCache
addListener in interface RemoteCache<K,V>addListener in interface Listenablelistener - must not be null.public void removeListener(Object listener)
Listenable
removeListener in interface RemoteCache<K,V>removeListener in interface Listenablelistener - listener to remove. Must not be null.RemoteCache.addListener(Object)public Set<Object> getListeners()
getListeners in interface RemoteCache<K,V>getListeners in interface ListenableRemoteCache.addListener(Object)public int size()
size in interface Map<K,V>size in interface RemoteCache<K,V>public boolean isEmpty()
isEmpty in interface Map<K,V>isEmpty in interface RemoteCache<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>containsValue in interface RemoteCache<K,V>public Set<K> keySet()
Cache
keySet in interface Map<K,V>keySet in interface Cache<K,V>keySet in interface RemoteCache<K,V>public Collection<V> values()
Cache
values in interface Map<K,V>values in interface Cache<K,V>values in interface RemoteCache<K,V>public Set<Map.Entry<K,V>> entrySet()
CacheMap.Entry. When this method is called on a cache configured with distribution mode, the set returned only
contains the mappings locally available in the cache instance. To avoid memory issues, there will be not attempt
to bring mappings from other nodes.
This method should only be used for debugging purposes such as to verify that the cache contains all the mappings
entered. Any other use involving execution of this method on a production system is not recommended.
entrySet in interface Map<K,V>entrySet in interface Cache<K,V>entrySet in interface RemoteCache<K,V>public void evict(K key)
CacheMap.remove(Object) to remove an
entry from the entire cache system.
This method is designed to evict an entry from memory to free up memory used by the application. This method uses
a 0 lock acquisition timeout so it does not block in attempting to acquire locks. It behaves as a no-op if the
lock on the entry cannot be acquired immediately.
Important: this method should not be called from within a transaction scope.
evict in interface Cache<K,V>evict in interface RemoteCache<K,V>key - key to evictpublic Configuration getConfiguration()
getConfiguration in interface Cache<K,V>getConfiguration in interface RemoteCache<K,V>public boolean startBatch()
Cache
startBatch in interface Cache<K,V>startBatch in interface RemoteCache<K,V>public void endBatch(boolean successful)
CacheCache.startBatch(). If no batch has been started, this is a
no-op.
endBatch in interface Cache<K,V>endBatch in interface RemoteCache<K,V>successful - if true, the batch completes, otherwise the batch is aborted and changes are not committed.
public boolean remove(Object key,
Object value)
RemoteCacheRemoteCache.removeWithVersion(Object, long) instead.
remove in interface ConcurrentMap<K,V>remove in interface RemoteCache<K,V>
public NotifyingFuture<Boolean> removeAsync(Object key,
Object value)
RemoteCacheRemoteCache.removeWithVersionAsync(Object, long) instead.
removeAsync in interface Cache<K,V>removeAsync in interface RemoteCache<K,V>key - key to removevalue - value to match on
public boolean replace(K key,
V oldValue,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
RemoteCacheRemoteCache.replaceWithVersion(Object, Object, long, int, int) instead.
replace in interface Cache<K,V>replace in interface RemoteCache<K,V>key - key to useoldValue - value to replacevalue - value to storelifespan - lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle time
public NotifyingFuture<Boolean> replaceAsync(K key,
V oldValue,
V newValue,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
RemoteCacheRemoteCache.replaceWithVersion(Object, Object, long, int, int) instead.
replaceAsync in interface Cache<K,V>replaceAsync in interface RemoteCache<K,V>key - key to removeoldValue - value to overwritenewValue - value to storelifespan - lifespan of entrylifespanUnit - time unit for lifespanmaxIdle - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleUnit - time unit for max idle time
public AdvancedCache<K,V> getAdvancedCache()
RemoteCache
getAdvancedCache in interface Cache<K,V>getAdvancedCache in interface RemoteCache<K,V>public void compact()
RemoteCache
compact in interface Cache<K,V>compact in interface RemoteCache<K,V>public ComponentStatus getStatus()
getStatus in interface Cache<K,V>
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||