public void setup(ApplicationContext appContext, CacheManagerModel cacheManagerModel) { this.cacheManagerModel = cacheManagerModel; try { statsBeanObjectName = new ObjectName(EhcacheStatsUtils.SAMPLED_CACHE_MANAGER_BEAN_NAME_PREFIX + ",name=" + EhcacheStatsUtils.mbeanSafe(cacheManagerModel.getName())); } catch (Exception e) { throw new RuntimeException(e); } IClusterModel clusterModel = cacheManagerModel.getClusterModel(); clusterModel.addPropertyChangeListener(clusterListener = new ClusterListener(clusterModel)); if (clusterModel.isReady()) { init(); } }
@Override public void tearDown() { if (!tornDown.compareAndSet(false, true)) { return; } if (cacheManagerModel != null) { IClusterModel clusterModel = cacheManagerModel.getClusterModel(); if (clusterModel != null) { IServer activeCoord = clusterModel.getActiveCoordinator(); if (activeCoord != null) { activeCoord.removeClientConnectionListener(this); } clusterModel.removePropertyChangeListener(clusterListener); } if (clusterListener != null) { clusterListener.tearDown(); } } clearAllTimeSeries(); synchronized (this) { cacheManagerModel = null; clusterListener = null; } super.tearDown(); } }
@Override public void tearDown() { if (!tornDown.compareAndSet(false, true)) { return; } IClusterModel clusterModel = cacheManagerModel.getClusterModel(); if (clusterModel != null) { IServer activeCoord = clusterModel.getActiveCoordinator(); if (activeCoord != null) { activeCoord.removeClientConnectionListener(this); } clusterModel.removePropertyChangeListener(clusterListener); } clusterListener.tearDown(); clearAllTimeSeries(); synchronized (this) { cacheManagerModel = null; clusterListener = null; } super.tearDown(); } }
@Override public void tearDown() { if (!tornDown.compareAndSet(false, true)) { return; } IClusterModel clusterModel = cacheManagerModel.getClusterModel(); if (clusterModel != null) { IServer activeCoord = clusterModel.getActiveCoordinator(); if (activeCoord != null) { activeCoord.removeClientConnectionListener(this); } clusterModel.removePropertyChangeListener(clusterListener); } clusterListener.tearDown(); clearAllTimeSeries(); synchronized (this) { cacheManagerModel = null; clusterListener = null; } super.tearDown(); } }
public void setup(ApplicationContext appContext, CacheManagerModel cacheManagerModel) { this.cacheManagerModel = cacheManagerModel; try { statsBeanObjectName = EhcacheStatsUtils.getSampledCacheManagerBeanName(cacheManagerModel.getName()); } catch (Exception e) { throw new RuntimeException(e); } IClusterModel clusterModel = cacheManagerModel.getClusterModel(); if (clusterModel != null) { clusterModel.addPropertyChangeListener(clusterListener = new ClusterListener(clusterModel)); if (clusterModel.isReady()) { init(); } } }
public void setup(ApplicationContext appContext, CacheManagerModel cacheManagerModel) { this.cacheManagerModel = cacheManagerModel; try { statsBeanObjectName = EhcacheStatsUtils.getSampledCacheManagerBeanName(cacheManagerModel.getName()); } catch (Exception e) { throw new RuntimeException(e); } IClusterModel clusterModel = cacheManagerModel.getClusterModel(); clusterModel.addPropertyChangeListener(clusterListener = new ClusterListener(clusterModel)); if (clusterModel.isReady()) { init(); } }