Class HibernateClusterAwareCacheManagerFactory

  • 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.atlassian.cache.CacheManager>, org.springframework.beans.factory.InitializingBean

    public class HibernateClusterAwareCacheManagerFactory
    extends org.springframework.beans.factory.config.AbstractFactoryBean<com.atlassian.cache.CacheManager>
    This is just a workaround to wire our cache manager beans. Without this factory, HibernateClusterAwareCacheManager shares same type with ehCacheManager thus will fail creation of cacheManagerInternal. See ClusterAwareFactoryBean#createInstance and BeanFactoryUtils#beanNamesForTypeIncludingAncestors
    Since:
    6.14
    • 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

      • HibernateClusterAwareCacheManagerFactory

        public HibernateClusterAwareCacheManagerFactory​(com.atlassian.cache.CacheManager delegate,
                                                        ClusterManager clusterManager,
                                                        ClusterEventWrapperService clusterEventWrapperService,
                                                        com.atlassian.event.api.EventPublisher eventPublisher,
                                                        org.hibernate.SessionFactory sessionFactory)
    • Method Detail

      • getObjectType

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

        protected com.atlassian.cache.CacheManager createInstance()
                                                           throws Exception
        Specified by:
        createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<com.atlassian.cache.CacheManager>
        Throws:
        Exception