本文整理了Java中org.apache.geode.cache.RegionAttributes.getConcurrencyLevel
方法的一些代码示例,展示了RegionAttributes.getConcurrencyLevel
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RegionAttributes.getConcurrencyLevel
方法的具体详情如下:
包路径:org.apache.geode.cache.RegionAttributes
类名称:RegionAttributes
方法名:getConcurrencyLevel
[英]Returns the concurrencyLevel of the entries map. Default is 16.
[中]返回条目映射的并发级别。默认值为16。
代码示例来源:origin: apache/geode
@Override
public int getConcurrencyLevel() {
return this.ra.getConcurrencyLevel();
}
代码示例来源:origin: apache/geode
CompactMapRangeIndex(InternalCache cache, String indexName, Region region, String fromClause,
String indexedExpression, String projectionAttributes, String origFromClause,
String origIndxExpr, String[] defintions, boolean isAllKeys,
String[] multiIndexingKeysPattern, Object[] mapKeys, IndexStatistics stats) {
super(cache, indexName, region, fromClause, indexedExpression, projectionAttributes,
origFromClause, origIndxExpr, defintions, isAllKeys, multiIndexingKeysPattern, mapKeys,
stats);
RegionAttributes ra = region.getAttributes();
this.entryToMapKeyIndexKeyMap = new java.util.concurrent.ConcurrentHashMap(
ra.getInitialCapacity(), ra.getLoadFactor(), ra.getConcurrencyLevel());
}
代码示例来源:origin: apache/geode
MapRangeIndex(InternalCache cache, String indexName, Region region, String fromClause,
String indexedExpression, String projectionAttributes, String origFromClause,
String origIndxExpr, String[] defintions, boolean isAllKeys,
String[] multiIndexingKeysPattern, Object[] mapKeys, IndexStatistics stats) {
super(cache, indexName, region, fromClause, indexedExpression, projectionAttributes,
origFromClause, origIndxExpr, defintions, isAllKeys, multiIndexingKeysPattern, mapKeys,
stats);
RegionAttributes ra = region.getAttributes();
this.entryToMapKeysMap =
new RegionEntryToValuesMap(
new java.util.concurrent.ConcurrentHashMap(ra.getInitialCapacity(), ra.getLoadFactor(),
ra.getConcurrencyLevel()),
true /* user target list as the map keys will be unique */);
}
代码示例来源:origin: apache/geode
MemoryIndexStore(Region region, InternalIndexStatistics internalIndexStats, InternalCache cache) {
this.region = region;
RegionAttributes ra = region.getAttributes();
// Initialize the reverse-map if in-place modification is set by the
// application.
if (IndexManager.isObjectModificationInplace()) {
this.entryToValuesMap = new ConcurrentHashMap(ra.getInitialCapacity(), ra.getLoadFactor(),
ra.getConcurrencyLevel());
}
this.internalIndexStats = internalIndexStats;
this.cache = cache;
}
代码示例来源:origin: apache/geode
@Override
protected Region createRegion() {
Region region = mock(LocalRegion.class);
RegionAttributes ra = mock(RegionAttributes.class);
when(region.getAttributes()).thenReturn(ra);
when(ra.getInitialCapacity()).thenReturn(16);
when(ra.getLoadFactor()).thenReturn(.75f);
when(ra.getConcurrencyLevel()).thenReturn(16);
return region;
}
代码示例来源:origin: apache/geode
/**
* Create a HashIndex that can be used when executing queries.
*
* @param indexName the name of this index, used for statistics collection
* @param indexedExpression the expression to index on, a function dependent on region entries
* individually, limited to a path expression.
* @param fromClause expression that evaluates to the collection(s) that will be queried over,
* must contain one and only one region path, and only one iterator.
* @param projectionAttributes not used
* @param definitions the canonicalized definitions
*/
public HashIndex(InternalCache cache, String indexName, Region region, String fromClause,
String indexedExpression, String projectionAttributes, String origFromClause,
String origIndexExpr, String[] definitions, IndexStatistics stats) {
super(cache, indexName, region, fromClause, indexedExpression, projectionAttributes,
origFromClause, origIndexExpr, definitions, stats);
RegionAttributes ra = region.getAttributes();
if (IndexManager.isObjectModificationInplace()) {
entryToValuesMap = new ConcurrentHashMap(ra.getInitialCapacity(), ra.getLoadFactor(),
ra.getConcurrencyLevel());
} else {
if (entryToOldKeysMap == null) {
entryToOldKeysMap = new ThreadLocal<Object2ObjectOpenHashMap>();
}
}
entriesSet = new HashIndexSet();
}
代码示例来源:origin: apache/geode
/**
* Create an Range Index that can be used when executing queries.
*
* @param indexName the name of this index, used for statistics collection
* @param indexedExpression the expression to index on, a function dependent on region entries
* individually.
* @param fromClause expression that evaluates to the collection(s) that will be queried over,
* must contain one and only one region path.
* @param projectionAttributes expression that transforms each element in the result set of a
* query Return the newly created Index
*/
public RangeIndex(InternalCache cache, String indexName, Region region, String fromClause,
String indexedExpression, String projectionAttributes, String origFromClause,
String origIndexExpr, String[] definitions, IndexStatistics stats) {
super(cache, indexName, region, fromClause, indexedExpression, projectionAttributes,
origFromClause, origIndexExpr, definitions, stats);
RegionAttributes ra = region.getAttributes();
this.entryToValuesMap = new RegionEntryToValuesMap(
new java.util.concurrent.ConcurrentHashMap(ra.getInitialCapacity(), ra.getLoadFactor(),
ra.getConcurrencyLevel()),
false /* use set */);
nullMappedEntries = new RegionEntryToValuesMap(true /* use list */);
undefinedMappedEntries = new RegionEntryToValuesMap(true /* use list */);
}
代码示例来源:origin: apache/geode
allLoadFactors.add(new Float(ra.getLoadFactor()));
allInitialCaps.add(Integer.valueOf(ra.getInitialCapacity()));
allConcLevels.add(Integer.valueOf(ra.getConcurrencyLevel()));
allStatsEnabled.add(Boolean.valueOf(ra.getStatisticsEnabled()));
allUserAttributes.add(snap.getUserAttribute());
代码示例来源:origin: apache/geode
when(regionAttributes.getDataPolicy()).thenReturn(dataPolicy);
when(regionAttributes.getDiskStoreName()).thenReturn("store");
when(regionAttributes.getConcurrencyLevel()).thenReturn(16);
when(regionAttributes.getLoadFactor()).thenReturn(0.75f);
when(regionAttributes.getMembershipAttributes()).thenReturn(membershipAttributes);
代码示例来源:origin: apache/geode
"Ignore JTA is not the same");
if (this.concurrencyLevel != other.getConcurrencyLevel()) {
throw new RuntimeException(
"ConcurrencyLevel is not the same");
代码示例来源:origin: apache/geode
concurrencyLevel = ra.getConcurrencyLevel();
dataPolicy = ra.getDataPolicy();
diskStoreName = ra.getDiskStoreName();
代码示例来源:origin: apache/geode
boolean lockGrantor = regAttrs.isLockGrantor();
boolean multicastEnabled = regAttrs.getMulticastEnabled();
int concurrencyLevel = regAttrs.getConcurrencyLevel();
boolean indexMaintenanceSynchronous = regAttrs.getIndexMaintenanceSynchronous();
boolean statisticsEnabled = regAttrs.getStatisticsEnabled();
代码示例来源:origin: apache/geode
if (generateDefaults() || attrs.getConcurrencyLevel() != 16)
atts.addAttribute("", "", CONCURRENCY_LEVEL, "",
String.valueOf(attrs.getConcurrencyLevel()));
代码示例来源:origin: apache/geode
|| raLruLimit != getLruLimit() || ra.getConcurrencyLevel() != getConcurrencyLevel()
|| ra.getInitialCapacity() != getInitialCapacity()
|| ra.getLoadFactor() != getLoadFactor()
setConfig(raLruAlgorithm, raLruAction, raLruLimit, ra.getConcurrencyLevel(),
ra.getInitialCapacity(), ra.getLoadFactor(), ra.getStatisticsEnabled(), isBucket, flags,
partitionName, startingBucketId, compressorClassName, offHeap);
代码示例来源:origin: apache/geode
this.statisticsEnabled = attrs.getStatisticsEnabled();
this.ignoreJTA = attrs.getIgnoreJTA();
this.concurrencyLevel = attrs.getConcurrencyLevel();
this.concurrencyChecksEnabled = attrs.getConcurrencyChecksEnabled();
this.earlyAck = attrs.getEarlyAck();
代码示例来源:origin: apache/geode
this.initialCapacity = attrs.getInitialCapacity();
this.loadFactor = attrs.getLoadFactor();
this.concurrencyLevel = attrs.getConcurrencyLevel();
this.setConcurrencyChecksEnabled(
attrs.getConcurrencyChecksEnabled() && supportsConcurrencyChecks());
代码示例来源:origin: apache/geode
this.regionAttributes.initialCapacity = regionAttributes.getInitialCapacity();
this.regionAttributes.loadFactor = regionAttributes.getLoadFactor();
this.regionAttributes.concurrencyLevel = regionAttributes.getConcurrencyLevel();
this.regionAttributes.concurrencyChecksEnabled = regionAttributes.getConcurrencyChecksEnabled();
this.regionAttributes.earlyAck = regionAttributes.getEarlyAck();
代码示例来源:origin: apache/geode
this.statsEnabled = attr.getStatisticsEnabled();
this.ignoreJTA = attr.getIgnoreJTA();
this.concurrencyLevel = attr.getConcurrencyLevel();
this.concurrencyChecksEnabled = attr.getConcurrencyChecksEnabled();
this.loadFactor = attr.getLoadFactor();
代码示例来源:origin: apache/geode
if (parentIsUserSpecified) {
if (parentWithHas.hasConcurrencyLevel()) {
setConcurrencyLevel(parent.getConcurrencyLevel());
setConcurrencyLevel(parent.getConcurrencyLevel());
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!