private void destroyCache(Cache<Object, Object> cache) { if (cache.getCacheStatus() == CacheStatus.STARTED) { cache.stop(); } if (cache.getCacheStatus() != CacheStatus.DESTROYED && cache.getCacheStatus() != CacheStatus.INSTANTIATED) { cache.destroy(); } } }
/** * Stops the shared cache. * @param cache the shared cache */ protected void stopSharedCache(Cache cache) { try { if (cache.getCacheStatus() == CacheStatus.STARTED) { cache.stop(); } if (cache.getCacheStatus() != CacheStatus.DESTROYED && cache.getCacheStatus() != CacheStatus.INSTANTIATED) { cache.destroy(); } } catch (Throwable t) { log.warn("Unable to stop cache instance", t); } } }
/** * Stops the shared cache. * @param cache the shared cache */ protected void stopSharedCache(Cache cache) { try { if (cache.getCacheStatus() == CacheStatus.STARTED) { cache.stop(); } if (cache.getCacheStatus() != CacheStatus.DESTROYED && cache.getCacheStatus() != CacheStatus.INSTANTIATED) { cache.destroy(); } } catch (Throwable t) { log.warn("Unable to stop cache instance", t); } } }
protected Cache<String, Object> getCache() { if (_cache == null || _cache.getCacheStatus() != CacheStatus.STARTED) { _cache = SpringContextHolder.getInstance().getBean(CacheInstance.class).getCache(); } return _cache; }
if (cache.getCacheStatus() != CacheStatus.INSTANTIATED && cache.getCacheStatus() != CacheStatus.DESTROYED) { log.debug("JBoss Cache is already started with a transaction manager (" + cacheTm + ") that is not equal to our own (" + tm + ")");
@CacheStarted public void cacheStarted(CacheStartedEvent cacheStartedEvent) { if (clusteredlogger.isLoggingEnabled(StackLogger.TRACE_INFO)) { clusteredlogger.logInfo( "Mobicents Cache started, status: " + cacheStartedEvent.getCache().getCacheStatus() + ", Mode: " + cacheStartedEvent.getCache().getConfiguration().getCacheModeString()); } }
if (cache.getCacheStatus() != CacheStatus.INSTANTIATED && cache.getCacheStatus() != CacheStatus.DESTROYED) { log.debug("JBoss Cache is already started with a transaction manager (" + cacheTm + ") that is not equal to our own (" + tm + ")");
@CacheStopped public void cacheStopped(CacheStoppedEvent cacheStoppedEvent) { if (clusteredlogger.isLoggingEnabled(StackLogger.TRACE_INFO)) { clusteredlogger.logInfo( "Mobicents Cache stopped, status: " + cacheStoppedEvent.getCache().getCacheStatus() + ", Mode: " + cacheStoppedEvent.getCache().getConfiguration().getCacheModeString()); } }
TransactionManager cacheTm = cacheConfig.getRuntimeConfig().getTransactionManager(); if (!safeEquals(tm, cacheTm)) { if (cache.getCacheStatus() != CacheStatus.INSTANTIATED) {
TransactionManager cacheTm = cacheConfig.getRuntimeConfig().getTransactionManager(); if (!safeEquals(tm, cacheTm)) { if (cache.getCacheStatus() != CacheStatus.INSTANTIATED) {