org.apache.geode.cache.RegionAttributes.getLoadFactor()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.5k)|赞(0)|评价(0)|浏览(63)

本文整理了Java中org.apache.geode.cache.RegionAttributes.getLoadFactor方法的一些代码示例,展示了RegionAttributes.getLoadFactor的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RegionAttributes.getLoadFactor方法的具体详情如下:
包路径:org.apache.geode.cache.RegionAttributes
类名称:RegionAttributes
方法名:getLoadFactor

RegionAttributes.getLoadFactor介绍

[英]Returns the load factor of the entries map. Default is 0.75.
[中]返回条目映射的加载因子。默认值为0.75。

代码示例

代码示例来源:origin: apache/geode

@Override
public float getLoadFactor() {
 return this.ra.getLoadFactor();
}

代码示例来源: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

allCustomIdle.add(ra.getCustomEntryIdleTimeout().toString());
allScopes.add(ra.getScope());
allLoadFactors.add(new Float(ra.getLoadFactor()));
allInitialCaps.add(Integer.valueOf(ra.getInitialCapacity()));
allConcLevels.add(Integer.valueOf(ra.getConcurrencyLevel()));

代码示例来源:origin: apache/geode

when(regionAttributes.getDiskStoreName()).thenReturn("store");
when(regionAttributes.getConcurrencyLevel()).thenReturn(16);
when(regionAttributes.getLoadFactor()).thenReturn(0.75f);
when(regionAttributes.getMembershipAttributes()).thenReturn(membershipAttributes);
when(regionAttributes.getScope()).thenReturn(scope);

代码示例来源:origin: apache/geode

"Value Constraints are not the same");
if (this.loadFactor != other.getLoadFactor()) {
 throw new RuntimeException(
   "Load Factors are not the same");

代码示例来源:origin: apache/geode

indexMaintenanceSynchronous = ra.getIndexMaintenanceSynchronous();
initialCapacity = ra.getInitialCapacity();
loadFactor = ra.getLoadFactor();
multicastEnabled = ra.getMulticastEnabled();
poolName = ra.getPoolName();

代码示例来源:origin: apache/geode

String scope = regAttrs.getScope().toString();
int initialCapacity = regAttrs.getInitialCapacity();
float loadFactor = regAttrs.getLoadFactor();
boolean lockGrantor = regAttrs.isLockGrantor();
boolean multicastEnabled = regAttrs.getMulticastEnabled();

代码示例来源:origin: apache/geode

if (generateDefaults() || attrs.getLoadFactor() != 0.75f)
 atts.addAttribute("", "", LOAD_FACTOR, "", String.valueOf(attrs.getLoadFactor()));

代码示例来源:origin: apache/geode

|| raLruLimit != getLruLimit() || ra.getConcurrencyLevel() != getConcurrencyLevel()
 || ra.getInitialCapacity() != getInitialCapacity()
 || ra.getLoadFactor() != getLoadFactor()
 || ra.getStatisticsEnabled() != getStatisticsEnabled() || offHeap != getOffHeap()
 || !hasSameCompressor(ra)) {
ra.getInitialCapacity(), ra.getLoadFactor(), ra.getStatisticsEnabled(), isBucket, flags,
partitionName, startingBucketId, compressorClassName, offHeap);

代码示例来源:origin: apache/geode

this.keyConstraint = attrs.getKeyConstraint();
this.valueConstraint = attrs.getValueConstraint();
this.loadFactor = attrs.getLoadFactor();
this.regionIdleTimeout = attrs.getRegionIdleTimeout();
this.regionTimeToLive = attrs.getRegionTimeToLive();

代码示例来源:origin: apache/geode

this.valueConstraint = attrs.getValueConstraint();
this.initialCapacity = attrs.getInitialCapacity();
this.loadFactor = attrs.getLoadFactor();
this.concurrencyLevel = attrs.getConcurrencyLevel();
this.setConcurrencyChecksEnabled(

代码示例来源:origin: apache/geode

this.regionAttributes.valueConstraint = regionAttributes.getValueConstraint();
this.regionAttributes.initialCapacity = regionAttributes.getInitialCapacity();
this.regionAttributes.loadFactor = regionAttributes.getLoadFactor();
this.regionAttributes.concurrencyLevel = regionAttributes.getConcurrencyLevel();
this.regionAttributes.concurrencyChecksEnabled = regionAttributes.getConcurrencyChecksEnabled();

代码示例来源:origin: apache/geode

this.concurrencyLevel = attr.getConcurrencyLevel();
this.concurrencyChecksEnabled = attr.getConcurrencyChecksEnabled();
this.loadFactor = attr.getLoadFactor();
this.initialCapacity = attr.getInitialCapacity();
this.earlyAck = attr.getEarlyAck();

代码示例来源:origin: apache/geode

assertNull(attrs.getKeyConstraint());
assertEquals(16, attrs.getInitialCapacity());
assertEquals(0.75, attrs.getLoadFactor(), 0.0);
assertFalse(attrs.getStatisticsEnabled());
assertFalse(attrs.getPersistBackup());

代码示例来源:origin: apache/geode

if (parentIsUserSpecified) {
 if (parentWithHas.hasLoadFactor()) {
  setLoadFactor(parent.getLoadFactor());
 setLoadFactor(parent.getLoadFactor());

相关文章

微信公众号

最新文章

更多

RegionAttributes类方法