/** * Register ttl manager of cache for periodical check on expired entries. * * @param mgr ttl manager of cache. * */ public void register(GridCacheTtlManager mgr) { synchronized (mux) { if (cleanupWorker == null) startCleanupWorker(); mgrs.add(mgr); } }
/** {@inheritDoc} */ @Override protected void onKernalStop0(boolean cancel) { synchronized (mux) { stopCleanupWorker(); } }
/** {@inheritDoc} */ @Override protected void onKernalStop0(boolean cancel) { if (pendingEntries != null) pendingEntries.clear(); cctx.shared().ttl().unregister(this); }
GridCacheSharedTtlCleanupManager ttl = new GridCacheSharedTtlCleanupManager(); PartitionsEvictManager evict = new PartitionsEvictManager();
/** {@inheritDoc} */ @Override protected void start0() throws IgniteCheckedException { dhtCtx = cctx.isNear() ? cctx.near().dht().context() : cctx; boolean cleanupDisabled = cctx.kernalContext().isDaemon() || !cctx.config().isEagerTtl() || CU.isUtilityCache(cctx.name()) || cctx.dataStructuresCache() || (cctx.kernalContext().clientNode() && cctx.config().getNearConfiguration() == null); if (cleanupDisabled) return; eagerTtlEnabled = true; cctx.shared().ttl().register(this); pendingEntries = (!cctx.isLocal() && cctx.config().getNearConfiguration() != null) ? new GridConcurrentSkipListSetEx() : null; }
new CacheAffinitySharedManager<K, V>(), new GridCacheIoManager(), new GridCacheSharedTtlCleanupManager(), new PartitionsEvictManager(), new CacheNoopJtaManager(),
/** {@inheritDoc} */ @Override protected void start0() throws IgniteCheckedException { dhtCtx = cctx.isNear() ? cctx.near().dht().context() : cctx; boolean cleanupDisabled = cctx.kernalContext().isDaemon() || !cctx.config().isEagerTtl() || CU.isUtilityCache(cctx.name()) || cctx.dataStructuresCache() || (cctx.kernalContext().clientNode() && cctx.config().getNearConfiguration() == null); if (cleanupDisabled) return; eagerTtlEnabled = true; cctx.shared().ttl().register(this); pendingEntries = (!cctx.isLocal() && cctx.config().getNearConfiguration() != null) ? new GridConcurrentSkipListSetEx() : null; }
GridCacheSharedTtlCleanupManager ttl = new GridCacheSharedTtlCleanupManager(); PartitionsEvictManager evict = new PartitionsEvictManager();
/** * Unregister ttl manager of cache from periodical check on expired entries. * * @param mgr ttl manager of cache. * */ public void unregister(GridCacheTtlManager mgr) { synchronized (mux) { mgrs.remove(mgr); if (mgrs.isEmpty()) stopCleanupWorker(); } }
/** {@inheritDoc} */ @Override protected void onKernalStop0(boolean cancel) { if (pendingEntries != null) pendingEntries.clear(); cctx.shared().ttl().unregister(this); }
/** * Register ttl manager of cache for periodical check on expired entries. * * @param mgr ttl manager of cache. * */ public void register(GridCacheTtlManager mgr) { synchronized (mux) { if (cleanupWorker == null) startCleanupWorker(); mgrs.add(mgr); } }
/** {@inheritDoc} */ @Override protected void onKernalStop0(boolean cancel) { synchronized (mux) { stopCleanupWorker(); } }
/** * Unregister ttl manager of cache from periodical check on expired entries. * * @param mgr ttl manager of cache. * */ public void unregister(GridCacheTtlManager mgr) { synchronized (mux) { mgrs.remove(mgr); if (mgrs.isEmpty()) stopCleanupWorker(); } }