public class HazelcastSyncCache extends AbstractMapBasedSyncCache<com.hazelcast.map.IMap<Object,Object>>
SyncCache
implementation based on Hazelcast.Constructor and Description |
---|
HazelcastSyncCache(io.micronaut.core.convert.ConversionService<?> conversionService,
com.hazelcast.map.IMap<Object,Object> nativeCache,
ExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
AsyncCache<com.hazelcast.map.IMap<Object,Object>> |
async()
This method returns an async version of this cache interface implementation.
|
String |
getName() |
void |
put(Object key,
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<Object,Object> nativeCache, ExecutorService executorService)
conversionService
- the conversion servicenativeCache
- the native cacheexecutorService
- managers the pool of executorspublic void put(@NonNull Object key, @NonNull Object value)
SyncCache
Cache the specified value using the specified key.
put
in interface SyncCache<com.hazelcast.map.IMap<Object,Object>>
put
in class AbstractMapBasedSyncCache<com.hazelcast.map.IMap<Object,Object>>
key
- the key with which the specified value is to be associatedvalue
- the value to be associated with the specified keypublic String getName()
public AsyncCache<com.hazelcast.map.IMap<Object,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