/** * @param grpDesc Cache group descriptor. * @param filter Node filter. * @param cacheMode Cache mode. */ public void addCacheGroup(CacheGroupDescriptor grpDesc, IgnitePredicate<ClusterNode> filter, CacheMode cacheMode) { CacheGroupAffinity old = registeredCacheGrps.put(grpDesc.groupId(), new CacheGroupAffinity(grpDesc.cacheOrGroupName(), filter, cacheMode, grpDesc.persistenceEnabled())); assert old == null : old; }
/** {@inheritDoc} */ @Override public void beforeCacheGroupStart(CacheGroupDescriptor grpDesc) { if (grpDesc.persistenceEnabled()) { boolean localEnabled = cctx.database().walEnabled(grpDesc.groupId(), true); boolean globalEnabled = cctx.database().walEnabled(grpDesc.groupId(), false); if (!localEnabled || !globalEnabled) { File dir = cacheWorkDir(grpDesc.config()); assert dir.exists(); boolean res = IgniteUtils.delete(dir); assert res; if (!globalEnabled) grpDesc.walEnabled(false); } } }
grpDesc.caches(), 0, grpDesc.persistenceEnabled(), grpDesc.walEnabled(), grpDesc.walChangeRequests());
if (!grpDesc.persistenceEnabled()) return errorFuture("Cannot change WAL mode because persistence is not enabled for cache(s) [" + "caches=" + cacheNames + ", dataRegion=" + grpDesc.config().getDataRegionName() + ']');
ccfg.getBackups(), ccfg.getCacheMode() == LOCAL, grpDesc.persistenceEnabled());
ReuseList reuseList = sharedCtx.database().reuseList(memPlcName); boolean persistenceEnabled = recoveryMode || sharedCtx.localNode().isClient() ? desc.persistenceEnabled() : dataRegion != null && dataRegion.config().isPersistenceEnabled();
/** * @param grpDesc Cache group descriptor. * @param filter Node filter. * @param cacheMode Cache mode. */ public void addCacheGroup(CacheGroupDescriptor grpDesc, IgnitePredicate<ClusterNode> filter, CacheMode cacheMode) { CacheGroupAffinity old = registeredCacheGrps.put(grpDesc.groupId(), new CacheGroupAffinity(grpDesc.cacheOrGroupName(), filter, cacheMode, grpDesc.persistenceEnabled())); assert old == null : old; }
/** {@inheritDoc} */ @Override public void beforeCacheGroupStart(CacheGroupDescriptor grpDesc) { if (grpDesc.persistenceEnabled()) { boolean localEnabled = cctx.database().walEnabled(grpDesc.groupId(), true); boolean globalEnabled = cctx.database().walEnabled(grpDesc.groupId(), false); if (!localEnabled || !globalEnabled) { File dir = cacheWorkDir(grpDesc.config()); assert dir.exists(); boolean res = IgniteUtils.delete(dir); assert res; if (!globalEnabled) grpDesc.walEnabled(false); } } }
if (!grpDesc.persistenceEnabled()) return errorFuture("Cannot change WAL mode because persistence is not enabled for cache(s) [" + "caches=" + cacheNames + ", dataRegion=" + grpDesc.config().getDataRegionName() + ']');
grpDesc.caches(), 0, grpDesc.persistenceEnabled(), grpDesc.walEnabled(), grpDesc.walChangeRequests());
ccfg.getBackups(), ccfg.getCacheMode() == LOCAL, grpDesc.persistenceEnabled());
ReuseList reuseList = sharedCtx.database().reuseList(memPlcName); boolean persistenceEnabled = sharedCtx.localNode().isClient() ? desc.persistenceEnabled() : dataRegion != null && dataRegion.config().isPersistenceEnabled();