Class BlockingBasicCacheDecorator<K,V>

java.lang.Object
org.wildfly.clustering.cache.infinispan.AbstractBasicCacheDecorator<K,V>
org.wildfly.clustering.cache.infinispan.BlockingBasicCacheDecorator<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:
RemoteCacheDecorator

public class BlockingBasicCacheDecorator<K,V> extends AbstractBasicCacheDecorator<K,V>
A BasicCache decorator for cache implementations whose synchronous methods always block. Synchronous operations will delegating to asynchronous methods and wait for result.
Author:
Paul Ferraro
  • Constructor Details

    • BlockingBasicCacheDecorator

      protected BlockingBasicCacheDecorator(org.infinispan.commons.api.BasicCache<K,V> cache, Duration timeout)
      Creates a cache decorator
      Parameters:
      cache - the decorated cache
      timeout - the duration of time to wait for async operations to complete.
  • Method Details

    • join

      protected <T> T join(CompletableFuture<T> future)
      Returns the value from the specified future. Default behaviour waits indefinitely.
      Type Parameters:
      T - the future value type
      Parameters:
      future - a future value
      Returns:
      the value from the specified future.
    • clear

      public void clear()
    • containsKey

      public boolean containsKey(Object key)
    • compute

      public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction)
    • compute

      public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
    • compute

      public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • computeIfAbsent

      public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction)
    • computeIfAbsent

      public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit)
    • computeIfAbsent

      public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • computeIfPresent

      public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction)
    • computeIfPresent

      public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
    • computeIfPresent

      public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • get

      public V get(Object key)
    • merge

      public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction)
    • merge

      public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
    • merge

      public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • put

      public V put(K key, V value)
    • put

      public V put(K key, V value, long lifespan, TimeUnit lifespanUnit)
    • put

      public V put(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • putAll

      public void putAll(Map<? extends K, ? extends V> map)
    • putAll

      public void putAll(Map<? extends K, ? extends V> map, long lifespan, TimeUnit lifespanUnit)
    • putAll

      public void putAll(Map<? extends K, ? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • putIfAbsent

      public V putIfAbsent(K key, V value)
    • putIfAbsent

      public V putIfAbsent(K key, V value, long lifespan, TimeUnit unit)
    • putIfAbsent

      public V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • remove

      public V remove(Object key)
    • remove

      public boolean remove(Object key, Object value)
    • replace

      public V replace(K key, V value)
    • replace

      public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit)
    • replace

      public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • replace

      public boolean replace(K key, V oldValue, V newValue)
    • replace

      public boolean replace(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit)
    • replace

      public boolean replace(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
    • size

      public int size()