Class HazelcastInstanceFactoryBean

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<com.hazelcast.core.HazelcastInstance>, org.springframework.beans.factory.InitializingBean

    public class HazelcastInstanceFactoryBean
    extends org.springframework.beans.factory.config.AbstractFactoryBean<com.hazelcast.core.HazelcastInstance>
    Spring FactoryBean used to create a HazelcastInstance using a configuration file in a Spring Resource. The factory bean will also shutdown the instance on AbstractFactoryBean.destroy().
    Since:
    3.1.6
    Author:
    avasquez
    • Field Summary

      • Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

        logger
      • Fields inherited from interface org.springframework.beans.factory.FactoryBean

        OBJECT_TYPE_ATTRIBUTE
    • Constructor Detail

      • HazelcastInstanceFactoryBean

        public HazelcastInstanceFactoryBean()
    • Method Detail

      • setConfigLocation

        public void setConfigLocation​(org.springframework.core.io.Resource configLocation)
      • getObjectType

        public Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<com.hazelcast.core.HazelcastInstance>
        Specified by:
        getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<com.hazelcast.core.HazelcastInstance>
      • createInstance

        protected com.hazelcast.core.HazelcastInstance createInstance()
                                                               throws Exception
        Specified by:
        createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<com.hazelcast.core.HazelcastInstance>
        Throws:
        Exception
      • destroyInstance

        protected void destroyInstance​(com.hazelcast.core.HazelcastInstance instance)
                                throws Exception
        Overrides:
        destroyInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<com.hazelcast.core.HazelcastInstance>
        Throws:
        Exception