本文整理汇总了Java中org.apache.lucene.util.RamUsageEstimator.alignObjectSize方法的典型用法代码示例。如果您正苦于以下问题:Java RamUsageEstimator.alignObjectSize方法的具体用法?Java RamUsageEstimator.alignObjectSize怎么用?Java RamUsageEstimator.alignObjectSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.lucene.util.RamUsageEstimator
的用法示例。
在下文中一共展示了RamUsageEstimator.alignObjectSize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
/** Return the number of bytes used by this object. */
public long ramBytesUsed() {
long bytesUsed = RamUsageEstimator.alignObjectSize(baseRamBytesUsed());
bytesUsed += RamUsageEstimator.alignObjectSize(RamUsageEstimator.shallowSizeOf(subMutables));
for (PackedInts.Mutable gw : subMutables) {
bytesUsed += gw.ramBytesUsed();
}
return bytesUsed;
}
示例3: 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);
}
示例4: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return RamUsageEstimator.alignObjectSize(
RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
+ RamUsageEstimator.NUM_BYTES_OBJECT_REF
+ RamUsageEstimator.NUM_BYTES_LONG
+ RamUsageEstimator.NUM_BYTES_FLOAT)
+ current.ramBytesUsed();
}
示例5: 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);
}
示例6: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return SHALLOW_SIZE + RamUsageEstimator.alignObjectSize(RamUsageEstimator.NUM_BYTES_ARRAY_HEADER + RamUsageEstimator.NUM_BYTES_OBJECT_REF * size());
}
示例7: ramBytesUsed
import org.apache.lucene.util.RamUsageEstimator; //导入方法依赖的package包/类
@Override
public long ramBytesUsed() {
return RamUsageEstimator.alignObjectSize(RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + RamUsageEstimator.NUM_BYTES_INT);
}