java.lang.Object
org.bitlap.roaringbitmap.RangeBitmap.Appender
- 封闭类:
- RangeBitmap
Builder for constructing immutable RangeBitmaps
-
方法概要
修饰符和类型方法说明voidadd(long value) Adds the value and associates it with the current row index.build()see build(IntFunction)build(ByteBuffer buffer) Converts the appender into an immutable range index, using the supplied ByteBuffer.build(IntFunction<ByteBuffer> supplier) Converts the appender into an immutable range index.voidclear()Call this to reuse the appender and its buffersvoidserialize(ByteBuffer buffer) Serializes the bitmap to the buffer without materialising it.intReturns the size of the RangeBitmap on disk.
-
方法详细资料
-
build
Converts the appender into an immutable range index.- 参数:
supplier- provides an appropriate ByteBuffer to store into- 返回:
- a queriable RangeBitmap
-
build
see build(IntFunction) -
build
Converts the appender into an immutable range index, using the supplied ByteBuffer.- 参数:
buffer- a little endian buffer which must have sufficient capacity for the appended values.- 返回:
- a queriable RangeBitmap
-
clear
public void clear()Call this to reuse the appender and its buffers -
serializedSizeInBytes
public int serializedSizeInBytes()Returns the size of the RangeBitmap on disk.- 返回:
- the serialized size in bytes.
-
serialize
Serializes the bitmap to the buffer without materialising it. The user should call serializedSizeInBytes to size the buffer appropriately.It is not guaranteed that all values will be written
- 参数:
buffer- expected to be large enough to contain the bitmap.
-
add
public void add(long value) Adds the value and associates it with the current row index.- 参数:
value- the value, will be rejected if greater than max value.
-