/** * Changes the custom timeToLive for values in this region * * @param custom the new CustomExpiry * @return the old CustomExpiry */ @Override public CustomExpiry setCustomEntryTimeToLive(CustomExpiry custom) { CustomExpiry expiry = super.setCustomEntryTimeToLive(custom); // Set to Bucket regions as well dataStore.lockBucketCreationAndVisit( (bucketId, r) -> r.getAttributesMutator().setCustomEntryTimeToLive(custom)); return expiry; }
updateExpirationAttributes(cache, regionAttributes.getEntryTimeToLive(), region.getEntryTimeToLive(), p -> mutator.setEntryTimeToLive(p), p -> mutator.setCustomEntryTimeToLive(p)); updateExpirationAttributes(cache, regionAttributes.getRegionIdleTime(), region.getRegionIdleTimeout(), p -> mutator.setRegionIdleTimeout(p), null);
ExpirationAttributes expire2 = new ExpirationAttributes(timeout2, INVALIDATE); mutt.setCustomEntryTimeToLive(new TestExpiry(key2, expire2)); mutt.setCustomEntryTimeToLive(new TestExpiry(key1, expire3)); waitForDestroy(entry, tilt1, timeout1 / 2); } finally {
mutator.setCustomEntryTimeToLive(attrs.getCustomEntryTimeToLive());
.when(mockAttributesMutator).setCustomEntryTimeToLive(any(CustomExpiry.class));