public class HazelcastAsyncCache
extends java.lang.Object
implements io.micronaut.cache.AsyncCache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>
AsyncCache implementation based on Hazelcast.| Constructor and Description |
|---|
HazelcastAsyncCache(io.micronaut.core.convert.ConversionService<?> conversionService,
com.hazelcast.core.IMap<java.lang.Object,java.lang.Object> nativeCache,
java.util.concurrent.ExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.concurrent.CompletableFuture<java.util.Optional<T>> |
get(java.lang.Object key,
io.micronaut.core.type.Argument<T> requiredType) |
<T> java.util.concurrent.CompletableFuture<T> |
get(java.lang.Object key,
io.micronaut.core.type.Argument<T> requiredType,
java.util.function.Supplier<T> supplier) |
java.lang.String |
getName() |
com.hazelcast.core.IMap |
getNativeCache() |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
invalidate(java.lang.Object key) |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
invalidateAll() |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
put(java.lang.Object key,
java.lang.Object value) |
<T> java.util.concurrent.CompletableFuture<java.util.Optional<T>> |
putIfAbsent(java.lang.Object key,
T value) |
public HazelcastAsyncCache(io.micronaut.core.convert.ConversionService<?> conversionService,
com.hazelcast.core.IMap<java.lang.Object,java.lang.Object> nativeCache,
java.util.concurrent.ExecutorService executorService)
conversionService - the conversion servicenativeCache - the native cacheexecutorService - managers the pool of executors@Nonnull
public <T> java.util.concurrent.CompletableFuture<java.util.Optional<T>> get(@Nonnull
java.lang.Object key,
@Nonnull
io.micronaut.core.type.Argument<T> requiredType)
get in interface io.micronaut.cache.AsyncCache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>public <T> java.util.concurrent.CompletableFuture<T> get(@Nonnull
java.lang.Object key,
@Nonnull
io.micronaut.core.type.Argument<T> requiredType,
@Nonnull
java.util.function.Supplier<T> supplier)
get in interface io.micronaut.cache.AsyncCache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>@Nonnull
public <T> java.util.concurrent.CompletableFuture<java.util.Optional<T>> putIfAbsent(@Nonnull
java.lang.Object key,
@Nonnull
T value)
putIfAbsent in interface io.micronaut.cache.AsyncCache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>public java.util.concurrent.CompletableFuture<java.lang.Boolean> put(@Nonnull
java.lang.Object key,
@Nonnull
java.lang.Object value)
put in interface io.micronaut.cache.AsyncCache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>public java.util.concurrent.CompletableFuture<java.lang.Boolean> invalidate(@Nonnull
java.lang.Object key)
invalidate in interface io.micronaut.cache.AsyncCache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>public java.util.concurrent.CompletableFuture<java.lang.Boolean> invalidateAll()
invalidateAll in interface io.micronaut.cache.AsyncCache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>public java.lang.String getName()
getName in interface io.micronaut.cache.Cache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>public com.hazelcast.core.IMap getNativeCache()
getNativeCache in interface io.micronaut.cache.Cache<com.hazelcast.core.IMap<java.lang.Object,java.lang.Object>>