Class CoherenceAsyncCache

java.lang.Object
io.micronaut.cache.coherence.CoherenceAsyncCache
All Implemented Interfaces:
io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>, io.micronaut.cache.Cache<com.tangosol.net.NamedCache<Object,Object>>

public class CoherenceAsyncCache extends Object implements io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>
A AsyncCache implementation based on Coherence.
Since:
1.0
Author:
Vaso Putica
  • Constructor Details

    • CoherenceAsyncCache

      public CoherenceAsyncCache(io.micronaut.core.convert.ConversionService conversionService, com.tangosol.net.NamedCache<Object,Object> nativeCache, ExecutorService executorService)
      Parameters:
      conversionService - the conversion service
      nativeCache - the native cache
      executorService - manages the pool of executors
  • Method Details

    • get

      @NonNull public <T> @NonNull CompletableFuture<Optional<T>> get(@NonNull @NonNull Object key, @NonNull @NonNull io.micronaut.core.type.Argument<T> requiredType)
      Specified by:
      get in interface io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>
    • get

      public <T> CompletableFuture<T> get(@NonNull @NonNull Object key, @NonNull @NonNull io.micronaut.core.type.Argument<T> requiredType, @NonNull @NonNull Supplier<T> supplier)
      Specified by:
      get in interface io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>
    • putIfAbsent

      @NonNull public <T> @NonNull CompletableFuture<Optional<T>> putIfAbsent(@NonNull @NonNull Object key, @NonNull T value)
      Specified by:
      putIfAbsent in interface io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>
    • put

      public CompletableFuture<Boolean> put(@NonNull @NonNull Object key, @NonNull @NonNull Object value)
      Specified by:
      put in interface io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>
    • invalidate

      public CompletableFuture<Boolean> invalidate(Object key)
      Specified by:
      invalidate in interface io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>
    • invalidateAll

      public CompletableFuture<Boolean> invalidateAll()
      Specified by:
      invalidateAll in interface io.micronaut.cache.AsyncCache<com.tangosol.net.NamedCache<Object,Object>>
    • getName

      public String getName()
      Specified by:
      getName in interface io.micronaut.cache.Cache<com.tangosol.net.NamedCache<Object,Object>>
    • getNativeCache

      public com.tangosol.net.NamedCache<Object,Object> getNativeCache()
      Specified by:
      getNativeCache in interface io.micronaut.cache.Cache<com.tangosol.net.NamedCache<Object,Object>>