Package io.micronaut.cache.coherence
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 Summary
ConstructorDescriptionCoherenceAsyncCache
(io.micronaut.core.convert.ConversionService conversionService, com.tangosol.net.NamedCache<Object, Object> nativeCache, ExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescription<T> @NonNull CompletableFuture<Optional<T>>
<T> CompletableFuture<T>
get
(@NonNull Object key, @NonNull io.micronaut.core.type.Argument<T> requiredType, @NonNull Supplier<T> supplier) getName()
invalidate
(Object key) <T> @NonNull CompletableFuture<Optional<T>>
putIfAbsent
(@NonNull Object key, T value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.cache.AsyncCache
get, get
Methods inherited from interface io.micronaut.cache.Cache
getCacheInfo
-
Constructor Details
-
CoherenceAsyncCache
public CoherenceAsyncCache(io.micronaut.core.convert.ConversionService conversionService, com.tangosol.net.NamedCache<Object, Object> nativeCache, ExecutorService executorService) - Parameters:
conversionService
- the conversion servicenativeCache
- the native cacheexecutorService
- 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) -
get
public <T> CompletableFuture<T> get(@NonNull @NonNull Object key, @NonNull @NonNull io.micronaut.core.type.Argument<T> requiredType, @NonNull @NonNull Supplier<T> supplier) -
putIfAbsent
@NonNull public <T> @NonNull CompletableFuture<Optional<T>> putIfAbsent(@NonNull @NonNull Object key, @NonNull T value) -
put
-
invalidate
-
invalidateAll
-
getName
-
getNativeCache
-