@Override public int getEntryTimeToLiveTimeLimit() { return this.ra.getEntryTimeToLive().getTimeout(); }
@Override public ExpirationAction getEntryTimeToLiveAction() { return this.ra.getEntryTimeToLive().getAction(); }
@Override protected ExpirationAttributes getTTLAttributes() { return getLocalRegion().getAttributes().getEntryTimeToLive(); }
private void validateExpirationAttributes(final RegionAttributes userRA, final PartitionRegionConfig prconf) { if (!userRA.getRegionIdleTimeout().equals(prconf.getRegionIdleTimeout())) { throw new IllegalStateException( String.format( "The %1$s set in RegionAttributes is incompatible with %1$s used by other distributed members.", new Object[] {" region idle timout "})); } if (!userRA.getRegionTimeToLive().equals(prconf.getRegionTimeToLive())) { throw new IllegalStateException( String.format( "The %1$s set in RegionAttributes is incompatible with %1$s used by other distributed members.", new Object[] {" region time to live "})); } if (!userRA.getEntryIdleTimeout().equals(prconf.getEntryIdleTimeout())) { throw new IllegalStateException( String.format( "The %1$s set in RegionAttributes is incompatible with %1$s used by other distributed members.", new Object[] {" entry idle timout "})); } if (!userRA.getEntryTimeToLive().equals(prconf.getEntryTimeToLive())) { throw new IllegalStateException( String.format( "The %1$s set in RegionAttributes is incompatible with %1$s used by other distributed members.", new Object[] {" entry time to live "})); } }
private PartitionAttributes initializeAttributes(final Cache cache) { PartitionAttributes partitionAttributes = mock(PartitionAttributes.class); RegionAttributes attributes = mock(RegionAttributes.class); when(attributes.getCacheListeners()).thenReturn(new CacheListener[0]); when(attributes.getRegionTimeToLive()).thenReturn(ExpirationAttributes.DEFAULT); when(attributes.getRegionIdleTimeout()).thenReturn(ExpirationAttributes.DEFAULT); when(attributes.getEntryTimeToLive()).thenReturn(ExpirationAttributes.DEFAULT); when(attributes.getEntryIdleTimeout()).thenReturn(ExpirationAttributes.DEFAULT); when(attributes.getMembershipAttributes()).thenReturn(new MembershipAttributes()); when(cache.getRegionAttributes(RegionShortcut.PARTITION.toString())).thenReturn(attributes); when(partitionAttributes.getTotalNumBuckets()).thenReturn(113); return partitionAttributes; }
protected synchronized void sendValueRequest(final InternalDistributedMember sender) { // send a message to this responder asking for the value // do this on the waiting pool in case the send blocks // Always attempt to send the message to fix bug 37149 RegionAttributes attrs = this.region.getAttributes(); NetSearchRequestMessage.sendMessage(this, this.regionName, this.key, sender, this.remainingTimeout, attrs.getEntryTimeToLive().getTimeout(), attrs.getEntryIdleTimeout().getTimeout()); // if it turns out that we can't send a message to this member then // our membership listener should save the day and schedule a send // to someone else or give up and report a failed search. }
allEntryTtl.add(ra.getEntryTimeToLive()); allCustomTtl.add(ra.getCustomEntryTimeToLive().toString()); allRegionIdleTimeout.add(ra.getRegionIdleTimeout());
when(regionAttributes.getRegionTimeToLive()).thenReturn(expirationAttributes); when(regionAttributes.getRegionIdleTimeout()).thenReturn(expirationAttributes); when(regionAttributes.getEntryTimeToLive()).thenReturn(expirationAttributes); when(regionAttributes.getEntryIdleTimeout()).thenReturn(expirationAttributes); when(regionAttributes.getDataPolicy()).thenReturn(dataPolicy);
next, this.remainingTimeout, attrs.getEntryTimeToLive().getTimeout(), attrs.getEntryIdleTimeout().getTimeout()); waitForObject2(this.remainingTimeout);
this.remainingTimeout, attrs.getEntryTimeToLive().getTimeout(), attrs.getEntryIdleTimeout().getTimeout());
when(attrs.getScope()).thenReturn(Scope.DISTRIBUTED_ACK); when(attrs.getDataPolicy()).thenReturn(DataPolicy.EMPTY); when(attrs.getEntryTimeToLive()).thenReturn(expirationAttrs); when(attrs.getEntryIdleTimeout()).thenReturn(expirationAttrs); when(advisor.adviseInitializedReplicates()).thenReturn(replicates);
private synchronized void sendNetSearchRequest() { InternalDistributedMember nextResponder = nextAppropriateResponder(); if (nextResponder != null) { // Make a request to the next responder in the queue RegionAttributes attrs = this.region.getAttributes(); setSelectedNode(nextResponder); this.requestInProgress = true; this.remoteGetInProgress = true; NetSearchRequestMessage.sendMessage(this, this.regionName, this.key, nextResponder, this.remainingTimeout, attrs.getEntryTimeToLive().getTimeout(), attrs.getEntryIdleTimeout().getTimeout()); } else { this.remoteGetInProgress = false; checkIfDone(); } }
scope = ra.getScope(); statisticsEnabled = ra.getStatisticsEnabled(); entryTimeToLive = ra.getEntryTimeToLive().getTimeout(); isLockGrantor = ra.isLockGrantor(); entryIdleTimeout = ra.getEntryIdleTimeout().getTimeout(); expAction = ra.getEntryTimeToLive().getAction(); if (expAction != null) { entryTimeToLiveAction = expAction.toString();
ttlAttributes = regionAttributes.getEntryTimeToLive(); } else if ((ttlDisabled || ttlAttributes.equals(regionAttributes.getEntryTimeToLive())) && (idleDisabled || idleAttributes.equals(regionAttributes.getEntryIdleTimeout()))) {
int entryTimeToLive = regAttrs.getEntryTimeToLive().getTimeout(); int entryIdleTimeout = regAttrs.getEntryIdleTimeout().getTimeout();
this.entryIdleTimeout = attrs.getEntryIdleTimeout(); this.customEntryIdleTimeout = attrs.getCustomEntryIdleTimeout(); this.entryTimeToLive = attrs.getEntryTimeToLive(); this.customEntryTimeToLive = attrs.getCustomEntryTimeToLive(); this.initialCapacity = attrs.getInitialCapacity();
regionAttributes.getRegionIdleTimeout().getAction(); this.regionAttributes.entryTimeToLive = regionAttributes.getEntryTimeToLive().getTimeout(); this.regionAttributes.entryTimeToLiveExpirationAction = regionAttributes.getEntryTimeToLive().getAction(); this.regionAttributes.customEntryTimeToLive = regionAttributes.getCustomEntryTimeToLive(); this.regionAttributes.entryIdleTimeout = regionAttributes.getEntryIdleTimeout().getTimeout();
this.regionIdleTimeoutExpirationAction = attrs.getRegionIdleTimeout().getAction(); setRegionIdleTimeoutAttributes(); this.entryTimeToLive = attrs.getEntryTimeToLive().getTimeout(); this.entryTimeToLiveExpirationAction = attrs.getEntryTimeToLive().getAction(); setEntryTimeToLiveAttributes(); this.customEntryTimeToLive = attrs.getCustomEntryTimeToLive();
this.rTtl = attr.getRegionTimeToLive(); this.rIdleTimeout = attr.getRegionIdleTimeout(); this.eTtl = attr.getEntryTimeToLive(); this.customEttlDesc = getDesc(attr.getCustomEntryTimeToLive()); this.eIdleTimeout = attr.getEntryIdleTimeout();
assertEquals(0, attrs.getRegionTimeToLive().getTimeout()); assertEquals(0, attrs.getRegionIdleTimeout().getTimeout()); assertEquals(0, attrs.getEntryTimeToLive().getTimeout()); assertEquals(null, attrs.getCustomEntryTimeToLive()); assertEquals(0, attrs.getEntryIdleTimeout().getTimeout());