gpt4 book ai didi

org.apache.lucene.util.WeakIdentityMap.newConcurrentHashMap()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 06:41:05 26 4
gpt4 key购买 nike

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

WeakIdentityMap.newConcurrentHashMap介绍

[英]Creates a new WeakIdentityMap based on a ConcurrentHashMap. The map cleans up the reference queue on every read operation.
[中]基于ConcurrentHashMap创建新的WeakIdentityMap。地图cleans up the reference queue on every read operation

代码示例

代码示例来源:origin: org.apache.lucene/lucene-core

/**
 * Creates a new {@code WeakIdentityMap} based on a {@link ConcurrentHashMap}.
 * The map <a href="#reapInfo">cleans up the reference queue on every read operation</a>.
 */
public static <K,V> WeakIdentityMap<K,V> newConcurrentHashMap() {
 return newConcurrentHashMap(true);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/**
 * Creates a new {@code WeakIdentityMap} based on a {@link ConcurrentHashMap}.
 * The map <a href="#reapInfo">cleans up the reference queue on every read operation</a>.
 */
public static <K,V> WeakIdentityMap<K,V> newConcurrentHashMap() {
 return newConcurrentHashMap(true);
}

代码示例来源:origin: org.infinispan/infinispan-embedded-query

/**
 * Creates a new {@code WeakIdentityMap} based on a {@link ConcurrentHashMap}.
 * The map <a href="#reapInfo">cleans up the reference queue on every read operation</a>.
 */
public static <K,V> WeakIdentityMap<K,V> newConcurrentHashMap() {
 return newConcurrentHashMap(true);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Creates a new {@code WeakIdentityMap} based on a {@link ConcurrentHashMap}.
 * The map <a href="#reapInfo">cleans up the reference queue on every read operation</a>.
 */
public static <K,V> WeakIdentityMap<K,V> newConcurrentHashMap() {
 return newConcurrentHashMap(true);
}

代码示例来源:origin: apache/jackrabbit-oak

public OakIndexInput(String name, NodeBuilder file, String dirDetails,
           BlobFactory blobFactory) {
  super(name);
  this.dirDetails = dirDetails;
  this.file = getOakIndexFile(name, file, dirDetails, blobFactory);
  clones = WeakIdentityMap.newConcurrentHashMap();
}

代码示例来源:origin: org.apache.jackrabbit/oak-lucene

public OakIndexInput(String name, NodeBuilder file, String dirDetails,
           BlobFactory blobFactory) {
  super(name);
  this.dirDetails = dirDetails;
  this.file = getOakIndexFile(name, file, dirDetails, blobFactory);
  clones = WeakIdentityMap.newConcurrentHashMap();
}

代码示例来源:origin: gncloud/fastcatsearch

ByteBufferIndexInput(String resourceDescription, ByteBuffer[] buffers, long length, int chunkSizePower, boolean trackClones) throws IOException {
 super(resourceDescription);
 this.buffers = buffers;
 this.length = length;
 this.chunkSizePower = chunkSizePower;
 this.chunkSizeMask = (1L << chunkSizePower) - 1L;
 this.clones = trackClones ? WeakIdentityMap.<ByteBufferIndexInput,Boolean>newConcurrentHashMap() : null;
 
 assert chunkSizePower >= 0 && chunkSizePower <= 30;   
 assert (length >>> chunkSizePower) < Integer.MAX_VALUE;
 seek(0L);
}

代码示例来源:origin: org.infinispan/infinispan-embedded-query

public static ByteBufferIndexInput newInstance(String resourceDescription, ByteBuffer[] buffers, long length, int chunkSizePower, BufferCleaner cleaner, boolean trackClones) {
 final WeakIdentityMap<ByteBufferIndexInput,Boolean> clones = trackClones ? WeakIdentityMap.<ByteBufferIndexInput,Boolean>newConcurrentHashMap() : null;
 if (buffers.length == 1) {
  return new SingleBufferImpl(resourceDescription, buffers[0], length, chunkSizePower, cleaner, clones);
 } else {
  return new MultiBufferImpl(resourceDescription, buffers, 0, length, chunkSizePower, cleaner, clones);
 }
}

代码示例来源:origin: harbby/presto-connectors

public static ByteBufferIndexInput newInstance(String resourceDescription, ByteBuffer[] buffers, long length, int chunkSizePower, BufferCleaner cleaner, boolean trackClones) {
 final WeakIdentityMap<ByteBufferIndexInput,Boolean> clones = trackClones ? WeakIdentityMap.<ByteBufferIndexInput,Boolean>newConcurrentHashMap() : null;
 if (buffers.length == 1) {
  return new SingleBufferImpl(resourceDescription, buffers[0], length, chunkSizePower, cleaner, clones);
 } else {
  return new MultiBufferImpl(resourceDescription, buffers, 0, length, chunkSizePower, cleaner, clones);
 }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com