/** * Get a CacheHub instance which is not configured. If an instance already exists, it will be * returned. *<p> * @return CompositeCacheManager */ public static synchronized CompositeCacheManager getUnconfiguredInstance() { if ( instance == null ) { if ( log.isInfoEnabled() ) { log.info( "Instance is null, returning unconfigured instance" ); } instance = createInstance(); } if (!instance.isInitialized()) { instance.initialize(); } instance.clients.incrementAndGet(); return instance; }
/** * Get a CacheHub instance which is not configured. If an instance already exists, it will be * returned. *<p> * @return CompositeCacheManager */ public static synchronized CompositeCacheManager getUnconfiguredInstance() { if ( instance == null ) { if ( log.isInfoEnabled() ) { log.info( "Instance is null, returning unconfigured instance" ); } instance = createInstance(); } if (!instance.isInitialized()) { instance.initialize(); } instance.incrementClients(); return instance; }
/** * Initializes the cache manager using the props file for the given name. * <p> * @param propsFilename * @return CompositeCacheManager configured from the give propsFileName * @throws CacheException if the configuration cannot be loaded */ public static synchronized CompositeCacheManager getInstance( String propsFilename ) throws CacheException { if ( instance == null ) { if ( log.isInfoEnabled() ) { log.info( "Instance is null, creating with config [" + propsFilename + "]" ); } instance = createInstance(); } if (!instance.isInitialized()) { instance.initialize(); } if (!instance.isConfigured()) { instance.configure( propsFilename ); } instance.clients.incrementAndGet(); return instance; }
/** * Initializes the cache manager using the props file for the given name. * <p> * @param propsFilename * @return CompositeCacheManager configured from the give propsFileName * @throws CacheException if the configuration cannot be loaded */ public static synchronized CompositeCacheManager getInstance( String propsFilename ) throws CacheException { if ( instance == null ) { if ( log.isInfoEnabled() ) { log.info( "Instance is null, creating with config [" + propsFilename + "]" ); } instance = createInstance(); } if (!instance.isInitialized()) { instance.initialize(); } if (!instance.isConfigured()) { instance.configure( propsFilename ); } instance.incrementClients(); return instance; }