当前位置: 首页>>代码示例>>Java>>正文


Java Counter.addAndGet方法代码示例

本文整理汇总了Java中org.apache.lucene.util.Counter.addAndGet方法的典型用法代码示例。如果您正苦于以下问题:Java Counter.addAndGet方法的具体用法?Java Counter.addAndGet怎么用?Java Counter.addAndGet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.lucene.util.Counter的用法示例。


在下文中一共展示了Counter.addAndGet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BinaryDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public BinaryDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.bytes = new PagedBytes(BLOCK_BITS);
  this.bytesOut = bytes.getDataOutput();
  this.lengths = PackedLongValues.deltaPackedBuilder(PackedInts.COMPACT);
  this.iwBytesUsed = iwBytesUsed;
  this.docsWithField = new FixedBitSet(64);
  this.bytesUsed = docsWithFieldBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:BinaryDocValuesWriter.java

示例2: SortedSetDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public SortedSetDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  hash = new BytesRefHash(
      new ByteBlockPool(
          new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)),
          BytesRefHash.DEFAULT_CAPACITY,
          new DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
  pending = PackedLongValues.packedBuilder(PackedInts.COMPACT);
  pendingCounts = PackedLongValues.deltaPackedBuilder(PackedInts.COMPACT);
  bytesUsed = pending.ramBytesUsed() + pendingCounts.ramBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:SortedSetDocValuesWriter.java

示例3: SortedDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public SortedDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  hash = new BytesRefHash(
      new ByteBlockPool(
          new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)),
          BytesRefHash.DEFAULT_CAPACITY,
          new DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
  pending = PackedLongValues.deltaPackedBuilder(PackedInts.COMPACT);
  bytesUsed = pending.ramBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:SortedDocValuesWriter.java

示例4: NumericDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public NumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed, boolean trackDocsWithField) {
  pending = PackedLongValues.deltaPackedBuilder(PackedInts.COMPACT);
  docsWithField = trackDocsWithField ? new FixedBitSet(64) : null;
  bytesUsed = pending.ramBytesUsed() + docsWithFieldBytesUsed();
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:NumericDocValuesWriter.java

示例5: SortedNumericDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public SortedNumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  pending = PackedLongValues.deltaPackedBuilder(PackedInts.COMPACT);
  pendingCounts = PackedLongValues.deltaPackedBuilder(PackedInts.COMPACT);
  bytesUsed = pending.ramBytesUsed() + pendingCounts.ramBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:SortedNumericDocValuesWriter.java

示例6: BytesRefArray

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
/**
 * Creates a new {@link BytesRefArray} with a counter to track allocated bytes
 */
public BytesRefArray(Counter bytesUsed) {
  this.pool = new ByteBlockPool(new ByteBlockPool.DirectTrackingAllocator(
      bytesUsed));
  pool.nextBuffer();
  bytesUsed.addAndGet(RamUsageEstimator.NUM_BYTES_ARRAY_HEADER
      + RamUsageEstimator.NUM_BYTES_INT);
  this.bytesUsed = bytesUsed;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:BytesRefArray.java

示例7: collect

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
@Override
public void collect(int doc) throws IOException 
{
    if(sortedDocValues != null)
    {
        int ordinal = sortedDocValues.getOrd(doc);
        if(ordinal > -1)
        {
            String value = (String)schemaField.getType().toObject(schemaField, sortedDocValues.lookupOrd(ordinal));
            String group = doGroup ? mappings.get(value) : value;
            if(group == null)
            {
                group = value;
            }

            Counter counter = counters.get(group);
            if(counter == null)
            {
                counter = Counter.newCounter();
                counters.put(group, counter);
            }
            counter.addAndGet(1);
        }
    }


    delegate.collect(doc);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:29,代码来源:MimetypeGroupingCollector.java

示例8: SortedSetDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public SortedSetDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  hash = new BytesRefHash(
      new ByteBlockPool(
          new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)),
          BytesRefHash.DEFAULT_CAPACITY,
          new DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
  pending = new AppendingLongBuffer();
  pendingCounts = new AppendingLongBuffer();
  bytesUsed = pending.ramBytesUsed() + pendingCounts.ramBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:14,代码来源:SortedSetDocValuesWriter.java

示例9: SortedDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public SortedDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  hash = new BytesRefHash(
      new ByteBlockPool(
          new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)),
          BytesRefHash.DEFAULT_CAPACITY,
          new DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
  pending = new AppendingLongBuffer();
  bytesUsed = pending.ramBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:13,代码来源:SortedDocValuesWriter.java

示例10: NumericDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public NumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  pending = new AppendingLongBuffer();
  bytesUsed = pending.ramBytesUsed();
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:8,代码来源:NumericDocValuesWriter.java

示例11: BinaryDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public BinaryDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.bytes = new PagedBytes(BLOCK_BITS);
  this.bytesOut = bytes.getDataOutput();
  this.lengths = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
  this.iwBytesUsed = iwBytesUsed;
  this.docsWithField = new FixedBitSet(64);
  this.bytesUsed = docsWithFieldBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:BinaryDocValuesWriter.java

示例12: SortedSetDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public SortedSetDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  hash = new BytesRefHash(
      new ByteBlockPool(
          new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)),
          BytesRefHash.DEFAULT_CAPACITY,
          new DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
  pending = new AppendingPackedLongBuffer(PackedInts.COMPACT);
  pendingCounts = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
  bytesUsed = pending.ramBytesUsed() + pendingCounts.ramBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:14,代码来源:SortedSetDocValuesWriter.java

示例13: SortedDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public SortedDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  hash = new BytesRefHash(
      new ByteBlockPool(
          new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)),
          BytesRefHash.DEFAULT_CAPACITY,
          new DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
  pending = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
  bytesUsed = pending.ramBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:SortedDocValuesWriter.java

示例14: NumericDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public NumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed, boolean trackDocsWithField) {
  pending = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
  docsWithField = trackDocsWithField ? new FixedBitSet(64) : null;
  bytesUsed = pending.ramBytesUsed() + docsWithFieldBytesUsed();
  this.fieldInfo = fieldInfo;
  this.iwBytesUsed = iwBytesUsed;
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:9,代码来源:NumericDocValuesWriter.java

示例15: BinaryDocValuesWriter

import org.apache.lucene.util.Counter; //导入方法依赖的package包/类
public BinaryDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {
  this.fieldInfo = fieldInfo;
  this.bytes = new PagedBytes(BLOCK_BITS);
  this.bytesOut = bytes.getDataOutput();
  this.lengths = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
  this.iwBytesUsed = iwBytesUsed;
  this.docsWithField = new OpenBitSet();
  this.bytesUsed = docsWithFieldBytesUsed();
  iwBytesUsed.addAndGet(bytesUsed);
}
 
开发者ID:jimaguere,项目名称:Maskana-Gestor-de-Conocimiento,代码行数:11,代码来源:BinaryDocValuesWriter.java


注:本文中的org.apache.lucene.util.Counter.addAndGet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。