@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; } }