本文整理了Java中org.apache.geode.cache.RegionAttributes.getCloningEnabled
方法的一些代码示例,展示了RegionAttributes.getCloningEnabled
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RegionAttributes.getCloningEnabled
方法的具体详情如下:
包路径:org.apache.geode.cache.RegionAttributes
类名称:RegionAttributes
方法名:getCloningEnabled
[英]Returns whether or not cloning is enabled on region. Default is false.
[中]返回是否在区域上启用克隆。默认值为false。
代码示例来源:origin: apache/geode
/**
* throws an exception when cloning is disabled while using delta
*/
private void validateDelta(EntryEventImpl event) {
if (event.getDeltaBytes() != null && !event.getRegion().getAttributes().getCloningEnabled()) {
throw new UnsupportedOperationInTransactionException(
"Delta without cloning cannot be used in transaction");
}
}
代码示例来源:origin: apache/geode
throw new RuntimeException(s);
if (this.cloningEnabled != other.getCloningEnabled()) {
throw new RuntimeException(
String.format("Cloning enabled is not the same: this: %s other: %s",
new Object[] {Boolean.valueOf(this.cloningEnabled),
Boolean.valueOf(other.getCloningEnabled())}));
代码示例来源:origin: apache/geode
public RegionAttributesInfo(RegionAttributes<?, ?> ra) {
cloningEnabled = ra.getCloningEnabled();
concurrencyChecksEnabled = ra.getConcurrencyChecksEnabled();
concurrencyLevel = ra.getConcurrencyLevel();
代码示例来源:origin: apache/geode
boolean asyncConflationEnabled = regAttrs.getEnableAsyncConflation();
String poolName = regAttrs.getPoolName();
boolean isCloningEnabled = regAttrs.getCloningEnabled();
String diskStoreName = regAttrs.getDiskStoreName();
String interestPolicy = null;
代码示例来源:origin: apache/geode
if ((!(attrs instanceof RegionAttributesCreation)
|| ((RegionAttributesCreation) attrs).hasCloningEnabled())) {
if (generateDefaults() || attrs.getCloningEnabled())
atts.addAttribute("", "", CLONING_ENABLED, "", String.valueOf(attrs.getCloningEnabled()));
代码示例来源:origin: apache/geode
if (null != attrs.getCompressor() && !attrs.getCloningEnabled()) {
throw new IllegalStateException("Cloning cannot be disabled when a compressor is set.");
代码示例来源:origin: apache/geode
this.poolName = attrs.getPoolName();
this.multicastEnabled = attrs.getMulticastEnabled();
this.cloningEnabled = attrs.getCloningEnabled();
代码示例来源:origin: apache/geode
this.membershipAttributes = attrs.getMembershipAttributes();
this.subscriptionAttributes = attrs.getSubscriptionAttributes();
this.cloningEnable = attrs.getCloningEnabled();
this.poolName = attrs.getPoolName();
if (this.poolName != null) {
代码示例来源:origin: apache/geode
regionAttributes.getEnableSubscriptionConflation();
this.regionAttributes.poolName = regionAttributes.getPoolName();
this.regionAttributes.isCloningEnabled = regionAttributes.getCloningEnabled();
this.regionAttributes.multicastEnabled = regionAttributes.getMulticastEnabled();
this.regionAttributes.gatewaySenderIds =
代码示例来源:origin: apache/geode
this.membershipAttributes = attr.getMembershipAttributes();
this.subscriptionAttributes = attr.getSubscriptionAttributes();
this.cloningEnable = attr.getCloningEnabled();
this.poolName = attr.getPoolName();
this.isDiskSynchronous = attr.isDiskSynchronous();
代码示例来源:origin: org.springframework.data/spring-data-geode-test
.thenAnswer(newGetter(() -> cacheListeners.toArray(new CacheListener[cacheListeners.size()])));
when(mockRegionAttributes.getCloningEnabled()).thenAnswer(newGetter(cloningEnabled));
when(mockRegionAttributes.getCompressor()).thenAnswer(newGetter(compressor));
when(mockRegionAttributes.getConcurrencyChecksEnabled()).thenAnswer(newGetter(concurrencyChecksEnabled));
代码示例来源:origin: org.springframework.data/spring-data-geode-test
when(mockAttributesMutator.getRegion()).thenReturn(mockRegion);
AtomicBoolean cloningEnabled = new AtomicBoolean(baseRegionAttributes.getCloningEnabled());
when(mockRegionAttributes.getCloningEnabled()).thenAnswer(newGetter(cloningEnabled::get));
when(mockRegionAttributes.getCompressor()).thenAnswer(newGetter(baseRegionAttributes::getCompressor));
when(mockRegionAttributes.getConcurrencyChecksEnabled()).thenAnswer(newGetter(baseRegionAttributes::getConcurrencyChecksEnabled));
代码示例来源:origin: org.springframework.data/spring-data-geode-test
when(mockRegionAttributes.getCloningEnabled()).thenAnswer(newGetter(cloningEnabled));
when(mockRegionAttributes.getCompressor()).thenAnswer(newGetter(compressor));
when(mockRegionAttributes.getConcurrencyChecksEnabled()).thenAnswer(newGetter(concurrencyChecksEnabled));
代码示例来源:origin: org.springframework.data/spring-data-gemfire
private Optional<String> configureWithRegionAttributes(ClientRegionFactory<K, V> clientRegionFactory) {
AtomicReference<String> regionAttributesPoolName = new AtomicReference<>(null);
Optional.ofNullable(getAttributes()).ifPresent(regionAttributes -> {
regionAttributesPoolName.set(regionAttributes.getPoolName());
stream(nullSafeArray(regionAttributes.getCacheListeners(), CacheListener.class))
.forEach(clientRegionFactory::addCacheListener);
clientRegionFactory.setCloningEnabled(regionAttributes.getCloningEnabled());
clientRegionFactory.setCompressor(regionAttributes.getCompressor());
clientRegionFactory.setConcurrencyChecksEnabled(regionAttributes.getConcurrencyChecksEnabled());
clientRegionFactory.setConcurrencyLevel(regionAttributes.getConcurrencyLevel());
clientRegionFactory.setCustomEntryIdleTimeout(regionAttributes.getCustomEntryIdleTimeout());
clientRegionFactory.setCustomEntryTimeToLive(regionAttributes.getCustomEntryTimeToLive());
clientRegionFactory.setDiskStoreName(regionAttributes.getDiskStoreName());
clientRegionFactory.setDiskSynchronous(regionAttributes.isDiskSynchronous());
clientRegionFactory.setEntryIdleTimeout(regionAttributes.getEntryIdleTimeout());
clientRegionFactory.setEntryTimeToLive(regionAttributes.getEntryTimeToLive());
clientRegionFactory.setEvictionAttributes(regionAttributes.getEvictionAttributes());
clientRegionFactory.setInitialCapacity(regionAttributes.getInitialCapacity());
clientRegionFactory.setKeyConstraint(regionAttributes.getKeyConstraint());
clientRegionFactory.setLoadFactor(regionAttributes.getLoadFactor());
clientRegionFactory.setRegionIdleTimeout(regionAttributes.getRegionIdleTimeout());
clientRegionFactory.setRegionTimeToLive(regionAttributes.getRegionTimeToLive());
clientRegionFactory.setStatisticsEnabled(regionAttributes.getStatisticsEnabled());
clientRegionFactory.setValueConstraint(regionAttributes.getValueConstraint());
});
return Optional.ofNullable(regionAttributesPoolName.get()).filter(StringUtils::hasText);
}
代码示例来源:origin: org.springframework.data/spring-data-geode
private Optional<String> configureWithRegionAttributes(ClientRegionFactory<K, V> clientRegionFactory) {
AtomicReference<String> regionAttributesPoolName = new AtomicReference<>(null);
Optional.ofNullable(getAttributes()).ifPresent(regionAttributes -> {
regionAttributesPoolName.set(regionAttributes.getPoolName());
stream(nullSafeArray(regionAttributes.getCacheListeners(), CacheListener.class))
.forEach(clientRegionFactory::addCacheListener);
clientRegionFactory.setCloningEnabled(regionAttributes.getCloningEnabled());
clientRegionFactory.setCompressor(regionAttributes.getCompressor());
clientRegionFactory.setConcurrencyChecksEnabled(regionAttributes.getConcurrencyChecksEnabled());
clientRegionFactory.setConcurrencyLevel(regionAttributes.getConcurrencyLevel());
clientRegionFactory.setCustomEntryIdleTimeout(regionAttributes.getCustomEntryIdleTimeout());
clientRegionFactory.setCustomEntryTimeToLive(regionAttributes.getCustomEntryTimeToLive());
clientRegionFactory.setDiskStoreName(regionAttributes.getDiskStoreName());
clientRegionFactory.setDiskSynchronous(regionAttributes.isDiskSynchronous());
clientRegionFactory.setEntryIdleTimeout(regionAttributes.getEntryIdleTimeout());
clientRegionFactory.setEntryTimeToLive(regionAttributes.getEntryTimeToLive());
clientRegionFactory.setEvictionAttributes(regionAttributes.getEvictionAttributes());
clientRegionFactory.setInitialCapacity(regionAttributes.getInitialCapacity());
clientRegionFactory.setKeyConstraint(regionAttributes.getKeyConstraint());
clientRegionFactory.setLoadFactor(regionAttributes.getLoadFactor());
clientRegionFactory.setRegionIdleTimeout(regionAttributes.getRegionIdleTimeout());
clientRegionFactory.setRegionTimeToLive(regionAttributes.getRegionTimeToLive());
clientRegionFactory.setStatisticsEnabled(regionAttributes.getStatisticsEnabled());
clientRegionFactory.setValueConstraint(regionAttributes.getValueConstraint());
});
return Optional.ofNullable(regionAttributesPoolName.get()).filter(StringUtils::hasText);
}
代码示例来源:origin: org.springframework.geode/spring-geode-actuator
private BiConsumer<Region<?, ?>, Health.Builder> withRegionDetails() {
return (region, builder) -> {
String regionName = region.getName();
builder.withDetail(cacheRegionKey(regionName, "full-path"), region.getFullPath());
Optional.ofNullable(region.getAttributes())
.ifPresent(regionAttributes -> builder
.withDetail(cacheRegionKey(regionName, "cloning-enabled"), toYesNoString(regionAttributes.getCloningEnabled()))
.withDetail(cacheRegionKey(regionName, "data-policy"), String.valueOf(regionAttributes.getDataPolicy()))
.withDetail(cacheRegionKey(regionName, "initial-capacity"), regionAttributes.getInitialCapacity())
.withDetail(cacheRegionKey(regionName, "load-factor"), regionAttributes.getLoadFactor())
.withDetail(cacheRegionKey(regionName, "key-constraint"), nullSafeClassName(regionAttributes.getKeyConstraint()))
.withDetail(cacheRegionKey(regionName, "off-heap"), toYesNoString(regionAttributes.getOffHeap()))
.withDetail(cacheRegionKey(regionName, "pool-name"), Optional.ofNullable(regionAttributes.getPoolName())
.filter(StringUtils::hasText)
.orElse(""))
.withDetail(cacheRegionKey(regionName, "scope"), String.valueOf(regionAttributes.getScope()))
.withDetail(cacheRegionKey(regionName, "statistics-enabled"), toYesNoString(regionAttributes.getStatisticsEnabled()))
.withDetail(cacheRegionKey(regionName, "value-constraint"), nullSafeClassName(regionAttributes.getValueConstraint())));
};
}
代码示例来源:origin: org.springframework.data/spring-data-geode
regionFactory.setCloningEnabled(regionAttributes.getCloningEnabled());
regionFactory.setCompressor(regionAttributes.getCompressor());
regionFactory.setConcurrencyChecksEnabled(regionAttributes.getConcurrencyChecksEnabled());
代码示例来源:origin: org.springframework.data/spring-data-gemfire
regionFactory.setCloningEnabled(regionAttributes.getCloningEnabled());
regionFactory.setCompressor(regionAttributes.getCompressor());
regionFactory.setConcurrencyChecksEnabled(regionAttributes.getConcurrencyChecksEnabled());
内容来源于网络,如有侵权,请联系作者删除!