/** * The 3rd step of EvictionAttributes validation, where mutation is acceptible * This should be done before buckets are created. Validate EvictionAttributes * with respect to localMaxMemory potentially changing the eviction * attributes. * * @see AttributesFactory#validateAttributes(RegionAttributes) * @see #validateDistributedEvictionAttributes(EvictionAttributes) */ void validateEvictionAttributesAgainstLocalMaxMemory() { final EvictionAttributes ea = pr.getEvictionAttributes(); if (pr.getLocalMaxMemory()==0 && !ea.getAction().isNone()) { // This is an accessor which won't ever do eviction, say so logger.info(LocalizedMessage.create( LocalizedStrings.PartitionedRegion_EVICTIONATTRIBUTES_0_WILL_HAVE_NO_EFFECT_1_2, new Object[] { ea, pr.getFullPath(), Integer.valueOf(pr.localMaxMemory)})); } }
if (eAction.isNone()) { return;
/** * The 3rd step of EvictionAttributes validation, where mutation is acceptible * This should be done before buckets are created. Validate EvictionAttributes * with respect to localMaxMemory potentially changing the eviction * attributes. * * @see AttributesFactory#validateAttributes(RegionAttributes) * @see #validateDistributedEvictionAttributes(EvictionAttributes) */ void validateEvictionAttributesAgainstLocalMaxMemory() { final EvictionAttributes ea = pr.getEvictionAttributes(); if (pr.getLocalMaxMemory()==0 && !ea.getAction().isNone()) { // This is an accessor which won't ever do eviction, say so pr.logger.info( LocalizedStrings. PartitionedRegion_EVICTIONATTRIBUTES_0_WILL_HAVE_NO_EFFECT_1_2, new Object[] { ea, pr.getFullPath(), Integer.valueOf(pr.localMaxMemory)}); } }
if (eAction.isNone()) { return;
expirationAttrs.toString()); if (evictAttrs != null && !evictAttrs.getAction().isNone()) { evictionStr = evictAttrs.toString(); if (evictAttrs.getAction().isOverflowToDisk()) {
expirationAttrs.toString()); if (evictAttrs != null && !evictAttrs.getAction().isNone()) { evictionStr = evictAttrs.toString(); if (evictAttrs.getAction().isOverflowToDisk()) {
expirationAttrs.toString()); if (evictAttrs != null && !evictAttrs.getAction().isNone()) { evictionStr = evictAttrs.toString(); if (evictAttrs.getAction().isOverflowToDisk()) {
"IllegalStateException</ExpectedException>"); assertTrue(firstEa.getAlgorithm().isLRUEntry()); assertTrue(!firstEa.getAction().isNone()); factory.setEvictionAttributes(EvictionAttributes .createLRUEntryAttributes(maxEntries, EvictionAction.NONE));
assertNotNull(root.getEvictionAttributes()); assertNotNull(root.getEvictionAttributes().getAction()); assertTrue(root.getEvictionAttributes().getAction().isNone()); assertTrue(root.getEvictionAttributes().getAlgorithm().isNone()); assertEquals(concurrencyLevel, root.getConcurrencyLevel());