@Factory
public class HazelcastFactory
extends java.lang.Object
HazelcastInstance
.Constructor and Description |
---|
HazelcastFactory() |
Modifier and Type | Method and Description |
---|---|
com.hazelcast.core.HazelcastInstance |
hazelcastClient()
Create a singleton
HazelcastInstance client, if client config resource exists. |
com.hazelcast.core.HazelcastInstance |
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. |
@Requires(beans=com.hazelcast.client.config.ClientConfig.class) @Singleton @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastInstance(com.hazelcast.client.config.ClientConfig clientConfig)
HazelcastInstance
client, based on an existing ClientConfig
bean.clientConfig
- the configuration read it as a beanHazelcastInstance
@Requires(beans=com.hazelcast.config.Config.class) @Singleton @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastInstance(com.hazelcast.config.Config config)
HazelcastInstance
member, based on an existing Config
bean.config
- the configuration read it as a beanHazelcastInstance
@Requires(missingBeans={com.hazelcast.config.Config.class,com.hazelcast.client.config.ClientConfig.class}) @Requires(condition=HazelcastConfigResourceCondition.HazelcastClientConfigCondition.class) @Singleton @Named(value="hazelcastInstance") @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastClient()
HazelcastInstance
client, if client config resource exists.HazelcastInstance
@Requires(missingBeans={com.hazelcast.config.Config.class,com.hazelcast.client.config.ClientConfig.class}) @Requires(condition=HazelcastConfigResourceCondition.HazelcastInstanceConfigCondition.class) @Singleton @Bean(preDestroy="shutdown") public com.hazelcast.core.HazelcastInstance hazelcastInstance()
HazelcastInstance
instance, if instance config resource exists.HazelcastInstance