Class AbstractBasicCacheDecorator<K,V>

java.lang.Object
org.wildfly.clustering.cache.infinispan.AbstractBasicCacheDecorator<K,V>
Type Parameters:
K - cache key type
V - cache value type
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>, org.infinispan.commons.api.AsyncCache<K,V>, org.infinispan.commons.api.BasicCache<K,V>, org.infinispan.commons.api.Lifecycle
Direct Known Subclasses:
BlockingBasicCacheDecorator, NonBlockingBasicCacheDecorator

public abstract class AbstractBasicCacheDecorator<K,V> extends Object implements org.infinispan.commons.api.BasicCache<K,V>
Decorator of a BasicCache.
Author:
Paul Ferraro
  • Constructor Details

    • AbstractBasicCacheDecorator

      protected AbstractBasicCacheDecorator(org.infinispan.commons.api.BasicCache<K,V> cache)
      Creates a cache decorator
      Parameters:
      cache - the decorated cache
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.infinispan.commons.api.BasicCache<K,V>
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in interface org.infinispan.commons.api.BasicCache<K,V>
    • start

      public void start()
      Specified by:
      start in interface org.infinispan.commons.api.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.infinispan.commons.api.Lifecycle
    • containsValue

      public boolean containsValue(Object value)
      Specified by:
      containsValue in interface Map<K,V>
    • entrySet

      public Set<Map.Entry<K,V>> entrySet()
      Specified by:
      entrySet in interface Map<K,V>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Map<K,V>
    • keySet

      public Set<K> keySet()
      Specified by:
      keySet in interface Map<K,V>
    • values

      public Collection<V> values()
      Specified by:
      values in interface Map<K,V>
    • clearAsync

      public CompletableFuture<Void> clearAsync()
      Specified by:
      clearAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • containsKeyAsync

      public CompletableFuture<Boolean> containsKeyAsync(K key)
      Specified by:
      containsKeyAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeAsync

      public CompletableFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction)
      Specified by:
      computeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeAsync

      public CompletableFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      computeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeAsync

      public CompletableFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
      Specified by:
      computeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeIfAbsentAsync

      public CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction)
      Specified by:
      computeIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeIfAbsentAsync

      public CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      computeIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeIfAbsentAsync

      public CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
      Specified by:
      computeIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeIfPresentAsync

      public CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction)
      Specified by:
      computeIfPresentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeIfPresentAsync

      public CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      computeIfPresentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • computeIfPresentAsync

      public CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
      Specified by:
      computeIfPresentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • getAsync

      public CompletableFuture<V> getAsync(K key)
      Specified by:
      getAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • getAllAsync

      public CompletableFuture<Map<K,V>> getAllAsync(Set<?> keys)
      Specified by:
      getAllAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • mergeAsync

      public CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction)
      Specified by:
      mergeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • mergeAsync

      public CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      mergeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • mergeAsync

      public CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
      Specified by:
      mergeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putAsync

      public CompletableFuture<V> putAsync(K key, V value)
      Specified by:
      putAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putAsync

      public CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      putAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putAsync

      public CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      putAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putAllAsync

      public CompletableFuture<Void> putAllAsync(Map<? extends K, ? extends V> data)
      Specified by:
      putAllAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putAllAsync

      public CompletableFuture<Void> putAllAsync(Map<? extends K, ? extends V> data, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      putAllAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putAllAsync

      public CompletableFuture<Void> putAllAsync(Map<? extends K, ? extends V> data, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      putAllAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putIfAbsentAsync

      public CompletableFuture<V> putIfAbsentAsync(K key, V value)
      Specified by:
      putIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putIfAbsentAsync

      public CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      putIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • putIfAbsentAsync

      public CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      putIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • removeAsync

      public CompletableFuture<V> removeAsync(Object key)
      Specified by:
      removeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • removeAsync

      public CompletableFuture<Boolean> removeAsync(Object key, Object value)
      Specified by:
      removeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • replaceAsync

      public CompletableFuture<V> replaceAsync(K key, V value)
      Specified by:
      replaceAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • replaceAsync

      public CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      replaceAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • replaceAsync

      public CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      replaceAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • replaceAsync

      public CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue)
      Specified by:
      replaceAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • replaceAsync

      public CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      replaceAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • replaceAsync

      public CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      replaceAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • sizeAsync

      public CompletableFuture<Long> sizeAsync()
      Specified by:
      sizeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
    • query

      public <T> org.infinispan.commons.api.query.Query<T> query(String query)
      Specified by:
      query in interface org.infinispan.commons.api.BasicCache<K,V>
    • continuousQuery

      public org.infinispan.commons.api.query.ContinuousQuery<K,V> continuousQuery()
      Specified by:
      continuousQuery in interface org.infinispan.commons.api.BasicCache<K,V>
    • equals

      public boolean equals(Object object)
      Specified by:
      equals in interface Map<K,V>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map<K,V>
      Overrides:
      hashCode in class Object