@Override public int getEntryIdleTimeoutTimeLimit() { return this.ra.getEntryIdleTimeout().getTimeout(); }
@Override public ExpirationAction getEntryIdleTimeoutAction() { return this.ra.getEntryIdleTimeout().getAction(); }
@Override protected ExpirationAttributes getIdleAttributes() { return getLocalRegion().getAttributes().getEntryIdleTimeout(); }
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. }
allCustomTtl.add(ra.getCustomEntryTimeToLive().toString()); allRegionIdleTimeout.add(ra.getRegionIdleTimeout()); allEntryIdleTimeout.add(ra.getEntryIdleTimeout()); allCustomIdle.add(ra.getCustomEntryIdleTimeout().toString()); allScopes.add(ra.getScope());
when(regionAttributes.getRegionIdleTimeout()).thenReturn(expirationAttributes); when(regionAttributes.getEntryTimeToLive()).thenReturn(expirationAttributes); when(regionAttributes.getEntryIdleTimeout()).thenReturn(expirationAttributes); when(regionAttributes.getDataPolicy()).thenReturn(dataPolicy); when(regionAttributes.getDiskStoreName()).thenReturn("store");
NetLoadRequestMessage.sendMessage(this, this.regionName, this.key, this.aCallbackArgument, next, this.remainingTimeout, attrs.getEntryTimeToLive().getTimeout(), attrs.getEntryIdleTimeout().getTimeout()); waitForObject2(this.remainingTimeout); if (this.remoteException == null) {
when(attrs.getDataPolicy()).thenReturn(DataPolicy.EMPTY); when(attrs.getEntryTimeToLive()).thenReturn(expirationAttrs); when(attrs.getEntryIdleTimeout()).thenReturn(expirationAttrs); when(advisor.adviseInitializedReplicates()).thenReturn(replicates);
attrs.getEntryIdleTimeout().getTimeout());
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(); } }
entryTimeToLive = ra.getEntryTimeToLive().getTimeout(); isLockGrantor = ra.isLockGrantor(); entryIdleTimeout = ra.getEntryIdleTimeout().getTimeout(); regionIdleTimeout = ra.getRegionIdleTimeout().getTimeout(); regionTimeToLive = ra.getRegionTimeToLive().getTimeout(); ExpirationAction expAction = ra.getEntryIdleTimeout().getAction(); if (expAction != null) { entryIdleTimeoutAction = expAction.toString();
idleAttributes = regionAttributes.getEntryIdleTimeout(); return null; } else if ((ttlDisabled || ttlAttributes.equals(regionAttributes.getEntryTimeToLive())) && (idleDisabled || idleAttributes.equals(regionAttributes.getEntryIdleTimeout()))) {
int regionIdleTimeout = regAttrs.getRegionIdleTimeout().getTimeout(); int entryTimeToLive = regAttrs.getEntryTimeToLive().getTimeout(); int entryIdleTimeout = regAttrs.getEntryIdleTimeout().getTimeout();
this.cacheLoader = attrs.getCacheLoader(); this.cacheWriter = attrs.getCacheWriter(); this.entryIdleTimeout = attrs.getEntryIdleTimeout(); this.customEntryIdleTimeout = attrs.getCustomEntryIdleTimeout(); this.entryTimeToLive = attrs.getEntryTimeToLive();
regionAttributes.getEntryTimeToLive().getAction(); this.regionAttributes.customEntryTimeToLive = regionAttributes.getCustomEntryTimeToLive(); this.regionAttributes.entryIdleTimeout = regionAttributes.getEntryIdleTimeout().getTimeout(); this.regionAttributes.entryIdleTimeoutExpirationAction = regionAttributes.getEntryIdleTimeout().getAction(); this.regionAttributes.customEntryIdleTimeout = regionAttributes.getCustomEntryIdleTimeout();
setEntryTimeToLiveAttributes(); this.customEntryTimeToLive = attrs.getCustomEntryTimeToLive(); this.entryIdleTimeout = attrs.getEntryIdleTimeout().getTimeout(); this.entryIdleTimeoutExpirationAction = attrs.getEntryIdleTimeout().getAction(); setEntryIdleTimeoutAttributes(); this.customEntryIdleTimeout = attrs.getCustomEntryIdleTimeout();
this.eTtl = attr.getEntryTimeToLive(); this.customEttlDesc = getDesc(attr.getCustomEntryTimeToLive()); this.eIdleTimeout = attr.getEntryIdleTimeout(); this.customEIdleDesc = getDesc(attr.getCustomEntryIdleTimeout()); this.dataPolicy = attr.getDataPolicy();
assertEquals(0, attrs.getEntryTimeToLive().getTimeout()); assertEquals(null, attrs.getCustomEntryTimeToLive()); assertEquals(0, attrs.getEntryIdleTimeout().getTimeout()); assertEquals(null, attrs.getCustomEntryIdleTimeout()); assertEquals(Scope.DISTRIBUTED_NO_ACK, attrs.getScope());