Class HazelcastFactory

java.lang.Object
io.micronaut.cache.hazelcast.HazelcastFactory

@Factory public class HazelcastFactory extends Object
Factory class that creates a HazelcastInstance.
Since:
1.0.0
Author:
Nirav Assar
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.hazelcast.core.HazelcastInstance
    Create a singleton HazelcastInstance client, if client config resource exists.
    com.hazelcast.core.HazelcastInstance
    Create a singleton HazelcastInstance instance, if instance config resource exists.
    com.hazelcast.core.HazelcastInstance
    hazelcastInstance(com.hazelcast.client.config.ClientConfig clientConfig)
    Create a singleton HazelcastInstance client, based on an existing ClientConfig bean.
    com.hazelcast.core.HazelcastInstance
    hazelcastInstance(com.hazelcast.config.Config config)
    Create a singleton HazelcastInstance member, based on an existing Config bean.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HazelcastFactory

      public HazelcastFactory()
  • Method Details

    • hazelcastInstance

      @Requires(beans=com.hazelcast.client.config.ClientConfig.class) @Singleton @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastInstance(com.hazelcast.client.config.ClientConfig clientConfig)
      Create a singleton HazelcastInstance client, based on an existing ClientConfig bean.
      Parameters:
      clientConfig - the configuration read it as a bean
      Returns:
      HazelcastInstance
    • hazelcastInstance

      @Requires(beans=com.hazelcast.config.Config.class) @Singleton @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastInstance(com.hazelcast.config.Config config)
      Create a singleton HazelcastInstance member, based on an existing Config bean.
      Parameters:
      config - the configuration read it as a bean
      Returns:
      HazelcastInstance
    • hazelcastClient

      @Requires(missingBeans={com.hazelcast.config.Config.class,com.hazelcast.client.config.ClientConfig.class}) @Requires(condition=HazelcastClientConfigCondition.class) @Singleton @Named("hazelcastInstance") @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastClient()
      Create a singleton HazelcastInstance client, if client config resource exists.
      Returns:
      HazelcastInstance
    • hazelcastInstance

      @Requires(missingBeans={com.hazelcast.config.Config.class,com.hazelcast.client.config.ClientConfig.class}) @Requires(condition=HazelcastInstanceConfigCondition.class) @Singleton @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastInstance()
      Create a singleton HazelcastInstance instance, if instance config resource exists.
      Returns:
      HazelcastInstance