public boolean getPersistBackup() { return getDataPolicy().isPersistentReplicate(); }
public boolean getPersistBackup() { return getDataPolicy().isPersistentReplicate(); }
public void setPersistBackup(boolean persistBackup) { if (persistBackup) { setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); } else { // It is less clear what we should do here for backwards compat. // If the current data policy is persist then we need to change it // otherwise just leave it alone if (getDataPolicy().isPersistentReplicate()) { setDataPolicy(DataPolicy.REPLICATE); } } }
/** * Sets whether or not a persistent backup should be made of the * region. * * @since 3.2 * @deprecated as of GemFire 5.0, use {@link DataPolicy#PERSISTENT_REPLICATE} instead */ @Deprecated public void setPersistBackup(boolean persistBackup) { if (persistBackup) { setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); } else { // It is less clear what we should do here for backwards compat. // If the current data policy is persist then we need to change it // otherwise just leave it alone if (this.regionAttributes.getDataPolicy().isPersistentReplicate()) { setDataPolicy(DataPolicy.REPLICATE); } } } /**
if (this.dataPolicy.withReplication()) { s |= REPLICATE_MASK; if (this.dataPolicy.isPersistentReplicate()) { s |= PERSISTENT_MASK;
/** * Perform write to disk if region is configured to write to disk * */ protected void writeToDisk () { try { persistentReplicate = attr.getDataPolicy().isPersistentReplicate(); evictionLimit = attr.getEvictionAttributes().getMaximum(); if (persistentReplicate) { if (evictionLimit <= 0) regionType = DISK_FOR_PERSIST; } else { regionType = DISK_FOR_OVRFLW_PERSIST; } if(regionType == DISK_FOR_PERSIST || regionType == DISK_FOR_OVRFLW_PERSIST){ region.writeToDisk(); Log.getLogWriter().info("writeToDisk performed on persistent region"); } } catch (RegionDestroyedException rdex) { Log.getLogWriter().info("RegionDestroyedException...may occur in concurrent environment. Continuing with test."); recoverRegion(); } catch (Exception ex) { throw new TestException(TestHelper.getStackTrace(ex)); } }
protected void forceRollOplogs () { try { persistentReplicate = attr.getDataPolicy().isPersistentReplicate(); evictionLimit = attr.getEvictionAttributes().getMaximum();
RegionAttributes attr = region.getAttributes(); persistentReplicate = attr.getDataPolicy() .isPersistentReplicate(); evictionLimit = attr.getEvictionAttributes().getMaximum();
protected void initialize() { try { ////initialize cache initCache(); attr = RegionHelper.getRegionAttributes(ConfigPrms.getRegionConfig()); regionName = RegionHelper.getRegionDescription(ConfigPrms.getRegionConfig()).getRegionName(); ///create region... if (MapRegionTest.region == null) { region = RegionHelper.createRegion(regionName, attr); boolean tempReplicate = false, tempPersistReplicate = false; tempReplicate = region.getAttributes().getDataPolicy().isReplicate(); tempPersistReplicate = region.getAttributes().getDataPolicy().isPersistentReplicate(); if(tempReplicate || tempPersistReplicate) { isReplicate = true; } } minTaskGranularitySec = TestConfig.tab().longAt(TestHelperPrms.minTaskGranularitySec); minTaskGranularityMS = minTaskGranularitySec* TestHelper.SEC_MILLI_FACTOR; ////this parameter @link serialExecution decides for careful validations of the region methods e.g. put isCarefulValidation = TestConfig.tab().booleanAt(Prms.serialExecution); } catch (Exception ex) { throw new TestException(TestHelper.getStackTrace(ex)); } }//end of initialize
RegionAttributes attr = region.getAttributes(); persistentReplicate = attr.getDataPolicy() .isPersistentReplicate(); evictionLimit = attr.getEvictionAttributes().getMaximum();
this.persistBackup = attr.getDataPolicy().isPersistentReplicate();
persistentReplicate = attr.getDataPolicy().isPersistentReplicate();