com.google.common.cache.LocalCache.discardingQueue()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(112)

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

LocalCache.discardingQueue介绍

[英]Queue that discards all elements.
[中]丢弃所有元素的队列。

代码示例

代码示例来源:origin: google/guava

Segment(
  LocalCache<K, V> map,
  int initialCapacity,
  long maxSegmentWeight,
  StatsCounter statsCounter) {
 this.map = map;
 this.maxSegmentWeight = maxSegmentWeight;
 this.statsCounter = checkNotNull(statsCounter);
 initTable(newEntryArray(initialCapacity));
 keyReferenceQueue = map.usesKeyReferences() ? new ReferenceQueue<K>() : null;
 valueReferenceQueue = map.usesValueReferences() ? new ReferenceQueue<V>() : null;
 recencyQueue =
   map.usesAccessQueue()
     ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 writeQueue =
   map.usesWriteQueue()
     ? new WriteQueue<K, V>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 accessQueue =
   map.usesAccessQueue()
     ? new AccessQueue<K, V>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
}

代码示例来源:origin: google/j2objc

Segment(
  LocalCache<K, V> map,
  int initialCapacity,
  long maxSegmentWeight,
  StatsCounter statsCounter) {
 this.map = map;
 this.maxSegmentWeight = maxSegmentWeight;
 this.statsCounter = checkNotNull(statsCounter);
 initTable(newEntryArray(initialCapacity));
 keyReferenceQueue = map.usesKeyReferences() ? new ReferenceQueue<K>() : null;
 valueReferenceQueue = map.usesValueReferences() ? new ReferenceQueue<V>() : null;
 recencyQueue =
   map.usesAccessQueue()
     ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 writeQueue =
   map.usesWriteQueue()
     ? new WriteQueue<K, V>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 accessQueue =
   map.usesAccessQueue()
     ? new AccessQueue<K, V>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
}

代码示例来源:origin: wildfly/wildfly

Segment(
  LocalCache<K, V> map,
  int initialCapacity,
  long maxSegmentWeight,
  StatsCounter statsCounter) {
 this.map = map;
 this.maxSegmentWeight = maxSegmentWeight;
 this.statsCounter = checkNotNull(statsCounter);
 initTable(newEntryArray(initialCapacity));
 keyReferenceQueue = map.usesKeyReferences() ? new ReferenceQueue<K>() : null;
 valueReferenceQueue = map.usesValueReferences() ? new ReferenceQueue<V>() : null;
 recencyQueue =
   map.usesAccessQueue()
     ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 writeQueue =
   map.usesWriteQueue()
     ? new WriteQueue<K, V>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 accessQueue =
   map.usesAccessQueue()
     ? new AccessQueue<K, V>()
     : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
}

代码示例来源:origin: google/guava

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: google/j2objc

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: wildfly/wildfly

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: com.diffplug.guava/guava-cache

Segment(LocalCache<K, V> map, int initialCapacity, long maxSegmentWeight,
    StatsCounter statsCounter) {
  this.map = map;
  this.maxSegmentWeight = maxSegmentWeight;
  this.statsCounter = checkNotNull(statsCounter);
  initTable(newEntryArray(initialCapacity));
  keyReferenceQueue = map.usesKeyReferences()
      ? new ReferenceQueue<K>() : null;
  valueReferenceQueue = map.usesValueReferences()
      ? new ReferenceQueue<V>() : null;
  recencyQueue = map.usesAccessQueue()
      ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>()
      : LocalCache.<ReferenceEntry<K, V>> discardingQueue();
  writeQueue = map.usesWriteQueue()
      ? new WriteQueue<K, V>()
      : LocalCache.<ReferenceEntry<K, V>> discardingQueue();
  accessQueue = map.usesAccessQueue()
      ? new AccessQueue<K, V>()
      : LocalCache.<ReferenceEntry<K, V>> discardingQueue();
}

代码示例来源:origin: Nextdoor/bender

Segment(LocalCache<K, V> map, int initialCapacity, long maxSegmentWeight,
  StatsCounter statsCounter) {
 this.map = map;
 this.maxSegmentWeight = maxSegmentWeight;
 this.statsCounter = checkNotNull(statsCounter);
 initTable(newEntryArray(initialCapacity));
 keyReferenceQueue = map.usesKeyReferences()
    ? new ReferenceQueue<K>() : null;
 valueReferenceQueue = map.usesValueReferences()
    ? new ReferenceQueue<V>() : null;
 recencyQueue = map.usesAccessQueue()
   ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 writeQueue = map.usesWriteQueue()
   ? new WriteQueue<K, V>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 accessQueue = map.usesAccessQueue()
   ? new AccessQueue<K, V>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
}

代码示例来源:origin: com.google.guava/guava-jdk5

Segment(LocalCache<K, V> map, int initialCapacity, long maxSegmentWeight,
  StatsCounter statsCounter) {
 this.map = map;
 this.maxSegmentWeight = maxSegmentWeight;
 this.statsCounter = checkNotNull(statsCounter);
 initTable(newEntryArray(initialCapacity));
 keyReferenceQueue = map.usesKeyReferences()
    ? new ReferenceQueue<K>() : null;
 valueReferenceQueue = map.usesValueReferences()
    ? new ReferenceQueue<V>() : null;
 recencyQueue = map.usesAccessQueue()
   ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 writeQueue = map.usesWriteQueue()
   ? new WriteQueue<K, V>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 accessQueue = map.usesAccessQueue()
   ? new AccessQueue<K, V>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
}

代码示例来源:origin: org.sonatype.sisu/sisu-guava

Segment(LocalCache<K, V> map, int initialCapacity, long maxSegmentWeight,
  StatsCounter statsCounter) {
 this.map = map;
 this.maxSegmentWeight = maxSegmentWeight;
 this.statsCounter = statsCounter;
 initTable(newEntryArray(initialCapacity));
 keyReferenceQueue = map.usesKeyReferences()
    ? new ReferenceQueue<K>() : null;
 valueReferenceQueue = map.usesValueReferences()
    ? new ReferenceQueue<V>() : null;
 recencyQueue = map.usesAccessQueue()
   ? new ConcurrentLinkedQueue<ReferenceEntry<K, V>>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 writeQueue = map.usesWriteQueue()
   ? new WriteQueue<K, V>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
 accessQueue = map.usesAccessQueue()
   ? new AccessQueue<K, V>()
   : LocalCache.<ReferenceEntry<K, V>>discardingQueue();
}

代码示例来源:origin: org.hudsonci.lib.guava/guava

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: com.diffplug.guava/guava-cache

AbstractCacheSet(ConcurrentMap<?, ?> map) {
  this.map = map;
}

代码示例来源:origin: Nextdoor/bender

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: com.google.guava/guava-jdk5

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

AbstractCacheSet(ConcurrentMap<?, ?> map) {
 this.map = map;
}

相关文章

微信公众号

最新文章

更多