Class AbstractAdvancedCache<K,V>

java.lang.Object
org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>
org.wildfly.clustering.cache.infinispan.embedded.AbstractAdvancedCache<K,V>
Type Parameters:
K - the cache key type
V - the cache value type
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>, org.infinispan.AdvancedCache<K,V>, org.infinispan.Cache<K,V>, org.infinispan.cache.impl.InternalCache<K,V>, org.infinispan.commons.api.AsyncCache<K,V>, org.infinispan.commons.api.BasicCache<K,V>, org.infinispan.commons.api.BatchingCache, org.infinispan.commons.api.Lifecycle, org.infinispan.commons.api.TransactionalCache, org.infinispan.notifications.FilteringListenable<K,V>, org.infinispan.notifications.Listenable
Direct Known Subclasses:
InvalidationCache

public abstract class AbstractAdvancedCache<K,V> extends org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>
Author:
Paul Ferraro
  • Constructor Details

    • AbstractAdvancedCache

      protected AbstractAdvancedCache(org.infinispan.AdvancedCache<K,V> cache)
  • Method Details

    • compute

      public V compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
      Specified by:
      compute in interface org.infinispan.Cache<K,V>
      Specified by:
      compute in interface ConcurrentMap<K,V>
      Specified by:
      compute in interface Map<K,V>
      Overrides:
      compute in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • compute

      public V compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      compute in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      compute in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • compute

      public V compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      compute in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      compute in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • computeIfAbsent

      public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
      Specified by:
      computeIfAbsent in interface org.infinispan.Cache<K,V>
      Specified by:
      computeIfAbsent in interface ConcurrentMap<K,V>
      Specified by:
      computeIfAbsent in interface Map<K,V>
      Overrides:
      computeIfAbsent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • computeIfAbsent

      public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      computeIfAbsent in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      computeIfAbsent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • computeIfAbsent

      public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      computeIfAbsent in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      computeIfAbsent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • computeIfPresent

      public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
      Specified by:
      computeIfPresent in interface org.infinispan.Cache<K,V>
      Specified by:
      computeIfPresent in interface ConcurrentMap<K,V>
      Specified by:
      computeIfPresent in interface Map<K,V>
      Overrides:
      computeIfPresent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • computeIfPresent

      public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      computeIfPresent in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      computeIfPresent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • computeIfPresent

      public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      computeIfPresent in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      computeIfPresent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • merge

      public V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
      Specified by:
      merge in interface org.infinispan.Cache<K,V>
      Specified by:
      merge in interface ConcurrentMap<K,V>
      Specified by:
      merge in interface Map<K,V>
      Overrides:
      merge in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • merge

      public V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      merge in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      merge in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • merge

      public V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      merge in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      merge in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • put

      public V put(K key, V value)
      Specified by:
      put in interface org.infinispan.commons.api.BasicCache<K,V>
      Specified by:
      put in interface Map<K,V>
      Overrides:
      put in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • put

      public V put(K key, V value, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      put in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      put in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • put

      public V put(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      put in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      put in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putAll

      public void putAll(Map<? extends K,? extends V> entries)
      Specified by:
      putAll in interface Map<K,V>
      Overrides:
      putAll in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putAll

      public void putAll(Map<? extends K,? extends V> entries, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      putAll in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      putAll in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putAll

      public void putAll(Map<? extends K,? extends V> entries, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      putAll in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      putAll in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putForExternalRead

      public void putForExternalRead(K key, V value)
      Specified by:
      putForExternalRead in interface org.infinispan.Cache<K,V>
      Overrides:
      putForExternalRead in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putForExternalRead

      public void putForExternalRead(K key, V value, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      putForExternalRead in interface org.infinispan.Cache<K,V>
      Overrides:
      putForExternalRead in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putForExternalRead

      public void putForExternalRead(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      putForExternalRead in interface org.infinispan.Cache<K,V>
      Overrides:
      putForExternalRead in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putIfAbsent

      public V putIfAbsent(K key, V value)
      Specified by:
      putIfAbsent in interface ConcurrentMap<K,V>
      Specified by:
      putIfAbsent in interface Map<K,V>
      Overrides:
      putIfAbsent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putIfAbsent

      public V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      putIfAbsent in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      putIfAbsent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putIfAbsent

      public V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      putIfAbsent in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      putIfAbsent in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • replace

      public V replace(K key, V value)
      Specified by:
      replace in interface ConcurrentMap<K,V>
      Specified by:
      replace in interface Map<K,V>
      Overrides:
      replace in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • replace

      public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit)
      Specified by:
      replace in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      replace in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • replace

      public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      replace in interface org.infinispan.commons.api.BasicCache<K,V>
      Overrides:
      replace in class org.infinispan.cache.impl.AbstractDelegatingCache<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>
      Overrides:
      computeAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<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>
      Overrides:
      computeAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>
    • computeAsync

      public CompletableFuture<V> computeAsync(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      computeAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
      Overrides:
      computeAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<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>
      Overrides:
      computeIfAbsentAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<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>
      Overrides:
      computeIfAbsentAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>
    • computeIfAbsentAsync

      public CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K,? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      computeIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
      Overrides:
      computeIfAbsentAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<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>
      Overrides:
      computeIfPresentAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<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>
      Overrides:
      computeIfPresentAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>
    • computeIfPresentAsync

      public CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
      Specified by:
      computeIfPresentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
      Overrides:
      computeIfPresentAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<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>
      Overrides:
      mergeAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<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>
      Overrides:
      mergeAsync in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>
    • mergeAsync

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

      public CompletableFuture<V> putAsync(K key, V value)
      Specified by:
      putAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
      Overrides:
      putAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<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>
      Overrides:
      putAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<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>
      Overrides:
      putAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putAllAsync

      public CompletableFuture<Void> putAllAsync(Map<? extends K,? extends V> entries)
      Specified by:
      putAllAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
      Overrides:
      putAllAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • putAllAsync

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

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

      public CompletableFuture<V> putIfAbsentAsync(K key, V value)
      Specified by:
      putIfAbsentAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
      Overrides:
      putIfAbsentAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<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>
      Overrides:
      putIfAbsentAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<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>
      Overrides:
      putIfAbsentAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • replaceAsync

      public CompletableFuture<V> replaceAsync(K key, V value)
      Specified by:
      replaceAsync in interface org.infinispan.commons.api.AsyncCache<K,V>
      Overrides:
      replaceAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<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>
      Overrides:
      replaceAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<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>
      Overrides:
      replaceAsync in class org.infinispan.cache.impl.AbstractDelegatingCache<K,V>
    • withFlags

      public org.infinispan.AdvancedCache<K,V> withFlags(org.infinispan.context.Flag flag)
      Specified by:
      withFlags in interface org.infinispan.AdvancedCache<K,V>
      Overrides:
      withFlags in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>
    • withFlags

      public org.infinispan.AdvancedCache<K,V> withFlags(org.infinispan.context.Flag... flags)
      Specified by:
      withFlags in interface org.infinispan.AdvancedCache<K,V>
      Overrides:
      withFlags in class org.infinispan.cache.impl.AbstractDelegatingAdvancedCache<K,V>