Package io.micronaut.cache.hazelcast
Class HazelcastSyncCache
java.lang.Object
io.micronaut.cache.AbstractMapBasedSyncCache<com.hazelcast.map.IMap<Object,Object>>
io.micronaut.cache.hazelcast.HazelcastSyncCache
- All Implemented Interfaces:
Cache<com.hazelcast.map.IMap<Object,
,Object>> SyncCache<com.hazelcast.map.IMap<Object,
Object>>
public class HazelcastSyncCache
extends AbstractMapBasedSyncCache<com.hazelcast.map.IMap<Object,Object>>
A
SyncCache
implementation based on Hazelcast.- Since:
- 1.0.0
- Author:
- Nirav Assar
-
Constructor Summary
ConstructorDescriptionHazelcastSyncCache
(io.micronaut.core.convert.ConversionService conversionService, com.hazelcast.map.IMap<Object, Object> nativeCache, ExecutorService executorService) -
Method Summary
Methods inherited from class io.micronaut.cache.AbstractMapBasedSyncCache
get, get, getConversionService, getNativeCache, invalidate, invalidateAll, putIfAbsent, putIfAbsent
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.Cache
getCacheInfo
Methods inherited from interface io.micronaut.cache.SyncCache
get, get, getExecutorService
-
Constructor Details
-
HazelcastSyncCache
public HazelcastSyncCache(io.micronaut.core.convert.ConversionService conversionService, com.hazelcast.map.IMap<Object, Object> nativeCache, ExecutorService executorService) - Parameters:
conversionService
- the conversion servicenativeCache
- the native cacheexecutorService
- managers the pool of executors
-
-
Method Details
-
put
Description copied from interface:SyncCache
Cache the specified value using the specified key.
- Specified by:
put
in interfaceSyncCache<com.hazelcast.map.IMap<Object,
Object>> - Overrides:
put
in classAbstractMapBasedSyncCache<com.hazelcast.map.IMap<Object,
Object>> - Parameters:
key
- the key with which the specified value is to be associatedvalue
- the value to be associated with the specified key
-
getName
-
async
Description copied from interface: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.- Returns:
- The
AsyncCache
implementation for this cache
-