@Stop private void stop() { if (clustered) { notifier.removeListener(cleanupService); cm.removeListener(cleanupService); cleanupService.stop(); cm.removeListener(this); currentViewId = CACHE_STOPPED_VIEW_ID; // indicate that the cache has stopped } shutDownGracefully(); }
@Stop @SuppressWarnings("unused") private void stop() { if (clustered) { notifier.removeListener(cleanupService); cleanupService.stop(); notifier.removeListener(this); currentTopologyId = CACHE_STOPPED_TOPOLOGY_ID; // indicate that the cache has stopped } shutDownGracefully(); }
@Start(priority = 9) // Start before cache loader manager @SuppressWarnings("unused") private void start() { final int concurrencyLevel = configuration.locking().concurrencyLevel(); localTransactions = ConcurrentMapFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); globalToLocalTransactions = ConcurrentMapFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); if (configuration.clustering().cacheMode().isClustered()) { minTopologyRecalculationLock = new ReentrantLock(); // Only initialize this if we are clustered. remoteTransactions = ConcurrentMapFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); cleanupService.start(cacheName, rpcManager, configuration); notifier.addListener(cleanupService); notifier.addListener(this); clustered = true; } }
@Start private void start() { final int concurrencyLevel = configuration.locking().concurrencyLevel(); localTransactions = ConcurrentMapFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); if (configuration.clustering().cacheMode().isClustered()) { minViewRecalculationLock = new ReentrantLock(); // Only initialize this if we are clustered. remoteTransactions = ConcurrentMapFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); cleanupService.start(cacheName, rpcManager, invoker); cm.addListener(cleanupService); cm.addListener(this); notifier.addListener(cleanupService); minTxViewId = rpcManager.getTransport().getViewId(); currentViewId = minTxViewId; log.debugf("Min view id set to %s", minTxViewId); clustered = true; } }