Map.Entry entry = (Map.Entry)iter.next(); Region bucketRegion = (BucketRegion)entry.getValue(); bucketRegion.getAttributesMutator().setEntryIdleTimeout(idleTimeout);
Map.Entry entry = (Map.Entry)iter.next(); Region bucketRegion = (BucketRegion)entry.getValue(); bucketRegion.getAttributesMutator().setEntryIdleTimeout(idleTimeout);
Region.Entry entry = null; try { region.getAttributesMutator().setEntryIdleTimeout(expire); entry = region.getEntry(key); assertEquals(value, entry.getValue()); region.getAttributesMutator().setEntryIdleTimeout(hugeExpire); region.put(key, value); tilt = System.currentTimeMillis() + timeout; pause(timeout * 2); assertEquals(value, entry.getValue()); region.getAttributesMutator().setEntryIdleTimeout(expire); waitForInvalidate(entry, tilt);
mutator.setEntryIdleTimeout(parseExpirationAttributes(newEntryExpirationIdleTime, region.getEntryIdleTimeout())); if (logger.isDebugEnabled()) { logger.debug("Region successfully altered - entry idle timeout");
/** * Expiration needs some more work in the new TX model. */ public void DISABLED_TILL_NEW_TX_IMPL_COMPLETE_testEntryIdleExpiration() throws CacheException { AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_NO_ACK); af.setStatisticsEnabled(true); af.setEntryIdleTimeout(new ExpirationAttributes(2, ExpirationAction.DESTROY)); Region exprReg = this.cache.createRegion("TXEntryIdle", af.create()); // exprReg.getCache().getLogger().info("invoking expiration test with 2"); generalEntryExpirationTest(exprReg, 2); AttributesMutator mutator = exprReg.getAttributesMutator(); mutator.setEntryIdleTimeout(new ExpirationAttributes(1, ExpirationAction.DESTROY)); // exprReg.getCache().getLogger().info("invoking expiration test with 1 after setting idle timeout of 1 second"); generalEntryExpirationTest(exprReg, 1); }
mutator.setEntryIdleTimeout(parseExpirationAttributes(newEntryExpirationIdleTime, region.getEntryIdleTimeout())); if (logger != null) logger.fine("Region successfully altered - entry idle timeout");
mutator.setEntryIdleTimeout(null); fail("Should have thrown an IllegalArgumentException"); mutator.setEntryIdleTimeout(new ExpirationAttributes(1, ExpirationAction.DESTROY)); fail("Should have thrown an IllegalStateException"); } catch (IllegalStateException ex) {
ExpirationAttributes expire2 = new ExpirationAttributes(timeout2, ExpirationAction.INVALIDATE); mutt.setEntryIdleTimeout(expire2);
break; case GfxdAttributesMutator.EXPIRE_ENTRY_IDLETIME: attrsMutator.setEntryIdleTimeout(expirationAttrs); break;
break; case GfxdAttributesMutator.EXPIRE_ENTRY_IDLETIME: attrsMutator.setEntryIdleTimeout(expirationAttrs); break;
mutator.setEntryIdleTimeout(attrs.getEntryIdleTimeout());
break; case GfxdAttributesMutator.EXPIRE_ENTRY_IDLETIME: attrsMutator.setEntryIdleTimeout(expirationAttrs); break;
mutator.setEntryIdleTimeout(attrs.getEntryIdleTimeout());
mutator.setCacheLoader(loader); mutator.setCacheWriter(writer); mutator.setEntryIdleTimeout(entryIdle); mutator.setCustomEntryIdleTimeout(customEntryIdle); mutator.setEntryTimeToLive(entryTTL); assertEquals(loader, mutator.setCacheLoader(loader2)); assertEquals(writer, mutator.setCacheWriter(writer2)); assertEquals(entryIdle, mutator.setEntryIdleTimeout(entryIdle2)); assertEquals(customEntryIdle, mutator.setCustomEntryIdleTimeout(customEntryIdle2)); assertEquals(entryTTL, mutator.setEntryTimeToLive(entryTTL2));