本文整理了Java中org.apache.geode.cache.RegionAttributes.getEntryTimeToLive
方法的一些代码示例,展示了RegionAttributes.getEntryTimeToLive
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RegionAttributes.getEntryTimeToLive
方法的具体详情如下:
包路径:org.apache.geode.cache.RegionAttributes
类名称:RegionAttributes
方法名:getEntryTimeToLive
[英]Gets the timeToLive
expiration attributes for entries in this region. Default is 0 which indicates that no expiration of this type is set.
[中]获取此区域中项的timeToLive
过期属性。默认值为0,表示未设置此类型的过期时间。
代码示例来源:origin: apache/geode
@Override
public int getEntryTimeToLiveTimeLimit() {
return this.ra.getEntryTimeToLive().getTimeout();
}
代码示例来源:origin: apache/geode
@Override
public ExpirationAction getEntryTimeToLiveAction() {
return this.ra.getEntryTimeToLive().getAction();
}
代码示例来源:origin: apache/geode
@Override
protected ExpirationAttributes getTTLAttributes() {
return getLocalRegion().getAttributes().getEntryTimeToLive();
}
代码示例来源:origin: apache/geode
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 "}));
}
}
代码示例来源:origin: apache/geode
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;
}
代码示例来源:origin: apache/geode
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.
}
代码示例来源:origin: apache/geode
allEntryTtl.add(ra.getEntryTimeToLive());
allCustomTtl.add(ra.getCustomEntryTimeToLive().toString());
allRegionIdleTimeout.add(ra.getRegionIdleTimeout());
代码示例来源:origin: apache/geode
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);
代码示例来源:origin: apache/geode
next, this.remainingTimeout, attrs.getEntryTimeToLive().getTimeout(),
attrs.getEntryIdleTimeout().getTimeout());
waitForObject2(this.remainingTimeout);
代码示例来源:origin: apache/geode
this.remainingTimeout, attrs.getEntryTimeToLive().getTimeout(),
attrs.getEntryIdleTimeout().getTimeout());
代码示例来源:origin: apache/geode
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);
代码示例来源:origin: apache/geode
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();
}
}
代码示例来源:origin: apache/geode
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();
代码示例来源:origin: apache/geode
ttlAttributes = regionAttributes.getEntryTimeToLive();
} else if ((ttlDisabled || ttlAttributes.equals(regionAttributes.getEntryTimeToLive()))
&& (idleDisabled || idleAttributes.equals(regionAttributes.getEntryIdleTimeout()))) {
代码示例来源:origin: apache/geode
int entryTimeToLive = regAttrs.getEntryTimeToLive().getTimeout();
int entryIdleTimeout = regAttrs.getEntryIdleTimeout().getTimeout();
代码示例来源:origin: apache/geode
this.entryIdleTimeout = attrs.getEntryIdleTimeout();
this.customEntryIdleTimeout = attrs.getCustomEntryIdleTimeout();
this.entryTimeToLive = attrs.getEntryTimeToLive();
this.customEntryTimeToLive = attrs.getCustomEntryTimeToLive();
this.initialCapacity = attrs.getInitialCapacity();
代码示例来源:origin: apache/geode
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();
代码示例来源:origin: apache/geode
this.regionIdleTimeoutExpirationAction = attrs.getRegionIdleTimeout().getAction();
setRegionIdleTimeoutAttributes();
this.entryTimeToLive = attrs.getEntryTimeToLive().getTimeout();
this.entryTimeToLiveExpirationAction = attrs.getEntryTimeToLive().getAction();
setEntryTimeToLiveAttributes();
this.customEntryTimeToLive = attrs.getCustomEntryTimeToLive();
代码示例来源:origin: apache/geode
this.rTtl = attr.getRegionTimeToLive();
this.rIdleTimeout = attr.getRegionIdleTimeout();
this.eTtl = attr.getEntryTimeToLive();
this.customEttlDesc = getDesc(attr.getCustomEntryTimeToLive());
this.eIdleTimeout = attr.getEntryIdleTimeout();
代码示例来源:origin: apache/geode
assertEquals(0, attrs.getRegionTimeToLive().getTimeout());
assertEquals(0, attrs.getRegionIdleTimeout().getTimeout());
assertEquals(0, attrs.getEntryTimeToLive().getTimeout());
assertEquals(null, attrs.getCustomEntryTimeToLive());
assertEquals(0, attrs.getEntryIdleTimeout().getTimeout());
内容来源于网络,如有侵权,请联系作者删除!