Class HazelcastCacheManager

java.lang.Object
io.micronaut.cache.hazelcast.HazelcastCacheManager
All Implemented Interfaces:
DynamicCacheManager<com.hazelcast.map.IMap<Object,Object>>

@Singleton public class HazelcastCacheManager extends Object implements DynamicCacheManager<com.hazelcast.map.IMap<Object,Object>>
A CacheManager implementation for Hazelcast.
Since:
1.0.0
Author:
Nirav Assar
  • Constructor Details

    • HazelcastCacheManager

      public HazelcastCacheManager(io.micronaut.core.convert.ConversionService conversionService, com.hazelcast.core.HazelcastInstance hazelcastInstance, @Named("io") ExecutorService executorService)
      Constructor.
      Parameters:
      conversionService - convert values that are returned
      hazelcastInstance - the client instance of hazelcast client
      executorService - managers the pool of executors
  • Method Details

    • getCache

      @NonNull public @NonNull SyncCache<com.hazelcast.map.IMap<Object,Object>> getCache(String name)
      Description copied from interface: DynamicCacheManager
      Retrieve a cache for the given name. If the cache does not previously exist, a new one will be created. The cache instance should not be cached internally because the cache manager will maintain the instance for future requests.
      Specified by:
      getCache in interface DynamicCacheManager<com.hazelcast.map.IMap<Object,Object>>
      Parameters:
      name - The name of the cache
      Returns:
      The SyncCache instance