Class DirectBitArrayR
java.lang.Object
org.apache.datasketches.filters.bloomfilter.DirectBitArrayR
- All Implemented Interfaces:
MemorySegmentStatus
This class can maintain the BitArray object off-heap.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this object's internal data is backed by a MemorySegment, which may be on-heap or off-heap.booleanReturns true if this object's internal data is backed by an off-heap (direct or native)) MemorySegment.booleanbooleanisSameResource(MemorySegment that) Returns true if an internally referenced MemorySegment has the same backing resource as that, or equivalently, if their two memory regions overlap.toString()
-
Method Details
-
hasMemorySegment
public boolean hasMemorySegment()Description copied from interface:MemorySegmentStatusReturns true if this object's internal data is backed by a MemorySegment, which may be on-heap or off-heap.- Specified by:
hasMemorySegmentin interfaceMemorySegmentStatus- Returns:
- true if this object's internal data is backed by a MemorySegment.
-
isOffHeap
public boolean isOffHeap()Description copied from interface:MemorySegmentStatusReturns true if this object's internal data is backed by an off-heap (direct or native)) MemorySegment.- Specified by:
isOffHeapin interfaceMemorySegmentStatus- Returns:
- true if this object's internal data is backed by an off-heap (direct or native)) MemorySegment.
-
isReadOnly
public boolean isReadOnly() -
isSameResource
Description copied from interface:MemorySegmentStatusReturns true if an internally referenced MemorySegment has the same backing resource as that, or equivalently, if their two memory regions overlap. This applies to both on-heap and off-heap MemorySegments.Note: If both segments are on-heap and not read-only, it can be determined if they were derived from the same backing memory (array). However, this is not always possible off-heap. Because of this asymmetry, this definition of "isSameResource" is confined to the existence of an overlap.
- Specified by:
isSameResourcein interfaceMemorySegmentStatus- Parameters:
that- The given MemorySegment.- Returns:
- true if an internally referenced MemorySegment has the same backing resource as that.
-
toString
-