TestOnlyHARegionQueue(String regionName, InternalCache cache, HARegionQueueAttributes hrqa, Map haContainer, final byte clientConflation, boolean isPrimary) throws IOException, ClassNotFoundException, CacheException, InterruptedException { super(regionName, cache, haContainer, null, clientConflation, isPrimary); ExpirationAttributes ea = new ExpirationAttributes(hrqa.getExpiryTime(), ExpirationAction.LOCAL_INVALIDATE); this.region.setOwner(this); this.region.getAttributesMutator().setEntryTimeToLive(ea); this.initialized.set(true); }
ExpirationAttributes ea = new ExpirationAttributes(hrqa.getExpiryTime(), ExpirationAction.LOCAL_INVALIDATE); hrq.region.getAttributesMutator().setEntryTimeToLive(ea);
/** * Changes the timeToLive expiration attributes for values in this region. * * @param timeToLive the timeToLive expiration attributes for entries * @return the previous value of entry timeToLive * @throws IllegalArgumentException if timeToLive is null or if the ExpirationAction is * LOCAL_DESTROY and the region is {@link DataPolicy#withReplication replicated} or if the * ExpirationAction is LOCAL_INVALIDATE and the region is * {@link DataPolicy#withReplication replicated} * @throws IllegalStateException if statistics are disabled for this region. */ @Override public ExpirationAttributes setEntryTimeToLive(ExpirationAttributes timeToLive) { ExpirationAttributes attr = super.setEntryTimeToLive(timeToLive); /* * All buckets must be created to make this change, otherwise it is possible for * updatePRConfig(...) to make changes that cause bucket creation to live lock */ PartitionRegionHelper.assignBucketsToPartitions(this); dataStore.lockBucketCreationAndVisit( (bucketId, r) -> r.getAttributesMutator().setEntryTimeToLive(timeToLive)); updatePRConfig(getPRConfigWithLatestExpirationAttributes(), false); return attr; }
p -> mutator.setCustomEntryIdleTimeout(p)); updateExpirationAttributes(cache, regionAttributes.getEntryTimeToLive(), region.getEntryTimeToLive(), p -> mutator.setEntryTimeToLive(p), p -> mutator.setCustomEntryTimeToLive(p)); updateExpirationAttributes(cache, regionAttributes.getRegionIdleTime(),
mutt.setEntryTimeToLive(expire2); eet = region.getEntryExpiryTask(key1); final long secondExpiryTime = eet.getExpirationTime(); mutt.setEntryTimeToLive(expire3); eet = region.getEntryExpiryTask(key1); final long thirdExpiryTime = eet.getExpirationTime(); mutt = region.getAttributesMutator(); ExpirationAttributes expire4 = new ExpirationAttributes(1, INVALIDATE); mutt.setEntryTimeToLive(expire4); WaitCriterion wc = new WaitCriterion() { @Override
mutator.setEntryTimeToLive(attrs.getEntryTimeToLive());
.when(mockAttributesMutator).setEntryTimeToLive(any(ExpirationAttributes.class));