本文整理汇总了Java中org.apache.lucene.util.RamUsageEstimator.sizeOf方法的典型用法代码示例。如果您正苦于以下问题:Java RamUsageEstimator.sizeOf方法的具体用法?Java RamUsageEstimator.sizeOf怎么用?Java RamUsageEstimator.sizeOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.lucene.util.RamUsageEstimator
的用法示例。
在下文中一共展示了RamUsageEstimator.sizeOf方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return RamUsageEstimator.alignObjectSize(
RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
+ 3 * RamUsageEstimator.NUM_BYTES_INT // bpvMinusBlockSize,valueCount,bitsPerValue
+ RamUsageEstimator.NUM_BYTES_LONG // maskRight
+ RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref
+ RamUsageEstimator.sizeOf(blocks);
}
示例2: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
long sizeInBytes = 0;
sizeInBytes += RamUsageEstimator.sizeOf(minValues);
sizeInBytes += RamUsageEstimator.sizeOf(averages);
for(PackedInts.Reader reader: subReaders) {
sizeInBytes += reader.ramBytesUsed();
}
return sizeInBytes;
}
示例3: build
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
/** Build a {@link PackedLongValues} instance that contains values that
* have been added to this builder. This operation is destructive. */
public PackedLongValues build() {
finish();
pending = null;
final PackedInts.Reader[] values = Arrays.copyOf(this.values, valuesOff);
final long ramBytesUsed = PackedLongValues.BASE_RAM_BYTES_USED + RamUsageEstimator.sizeOf(values);
return new PackedLongValues(pageShift, pageMask, values, size, ramBytesUsed);
}
示例4: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return RamUsageEstimator.alignObjectSize(
RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
+ 2 * RamUsageEstimator.NUM_BYTES_INT // valueCount,bitsPerValue
+ RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref
+ RamUsageEstimator.sizeOf(blocks);
}
示例5: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return RamUsageEstimator.alignObjectSize(
RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
+ 2 * RamUsageEstimator.NUM_BYTES_INT // valueCount,bitsPerValue
+ RamUsageEstimator.NUM_BYTES_OBJECT_REF) // values ref
+ RamUsageEstimator.sizeOf(values);
}
示例6: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return BASE_RAM_BYTES_USED
+ RamUsageEstimator.sizeOf(lowerLongs)
+ RamUsageEstimator.sizeOf(upperLongs)
+ RamUsageEstimator.sizeOf(upperZeroBitPositionIndex);
}
示例7: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
long size = BASE_RAM_BYTES_USED;
for (byte[] block : blocks) {
size += RamUsageEstimator.sizeOf(block);
}
return size;
}
示例8: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
long size = BASE_RAM_BYTES_USED;
size += bytes.ramBytesUsed();
if (packed) {
size += nodeRefToAddress.ramBytesUsed();
} else if (nodeAddress != null) {
size += nodeAddress.ramBytesUsed();
size += inCounts.ramBytesUsed();
}
size += cachedArcsBytesUsed;
size += RamUsageEstimator.sizeOf(bytesPerArc);
return size;
}
示例9: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return SHALLOW_SIZE + RamUsageEstimator.sizeOf(array);
}
示例10: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return RamUsageEstimator.NUM_BYTES_OBJECT_REF + RamUsageEstimator.sizeOf(values);
}
示例11: docsWithFieldBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
private long docsWithFieldBytesUsed() {
// size of the long[] + some overhead
return docsWithField == null ? 0 : RamUsageEstimator.sizeOf(docsWithField.getBits()) + 64;
}
示例12: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed(Long output) {
return RamUsageEstimator.sizeOf(output);
}