public class HazelcastSyncCache extends AbstractMapBasedSyncCache<com.hazelcast.map.IMap<java.lang.Object,java.lang.Object>>
SyncCache
implementation based on Hazelcast.Constructor and Description |
---|
HazelcastSyncCache(io.micronaut.core.convert.ConversionService<?> conversionService,
com.hazelcast.map.IMap<java.lang.Object,java.lang.Object> nativeCache,
java.util.concurrent.ExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
AsyncCache<com.hazelcast.map.IMap<java.lang.Object,java.lang.Object>> |
async()
This method returns an async version of this cache interface implementation.
|
java.lang.String |
getName() |
void |
put(java.lang.Object key,
java.lang.Object value)
Cache the specified value using the specified key.
|
get, get, getConversionService, getNativeCache, invalidate, invalidateAll, putIfAbsent, putIfAbsent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, get, getExecutorService
getCacheInfo
public HazelcastSyncCache(io.micronaut.core.convert.ConversionService<?> conversionService, com.hazelcast.map.IMap<java.lang.Object,java.lang.Object> nativeCache, java.util.concurrent.ExecutorService executorService)
conversionService
- the conversion servicenativeCache
- the native cacheexecutorService
- managers the pool of executorspublic void put(@Nonnull java.lang.Object key, @Nonnull java.lang.Object value)
SyncCache
Cache the specified value using the specified key.
put
in interface SyncCache<com.hazelcast.map.IMap<java.lang.Object,java.lang.Object>>
put
in class AbstractMapBasedSyncCache<com.hazelcast.map.IMap<java.lang.Object,java.lang.Object>>
key
- the key with which the specified value is to be associatedvalue
- the value to be associated with the specified keypublic java.lang.String getName()
getName
in interface Cache<com.hazelcast.map.IMap<java.lang.Object,java.lang.Object>>
getName
in class AbstractMapBasedSyncCache<com.hazelcast.map.IMap<java.lang.Object,java.lang.Object>>
public AsyncCache<com.hazelcast.map.IMap<java.lang.Object,java.lang.Object>> async()
SyncCache
This method returns an async version of this cache interface implementation.
The default behaviour will execute the operations in the same thread if null
is returned from SyncCache.getExecutorService()
. If an executor service is returned, the
operations will be offloaded to the provided executor service.
AsyncCache
implementation for this cache