コード例 #1
0
        private void UpdateBytesUsed()
        {
            long newBytesUsed = Pending.RamBytesUsed() + PendingCounts.RamBytesUsed();

            IwBytesUsed.AddAndGet(newBytesUsed - BytesUsed);
            BytesUsed = newBytesUsed;
        }
コード例 #2
0
 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);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: MultiDocValues.cs プロジェクト: zfxsss/lucenenet
            /// <summary>
            /// Returns total byte size used by this ordinal map.
            /// </summary>
            public virtual long RamBytesUsed()
            {
                long size = GlobalOrdDeltas.RamBytesUsed() + FirstSegments.RamBytesUsed();

                for (int i = 0; i < OrdDeltas.Length; i++)
                {
                    size += OrdDeltas[i].RamBytesUsed();
                }
                return(size);
            }