Package org.apache.cassandra.utils.obs
Class OffHeapBitSet
- java.lang.Object
-
- org.apache.cassandra.utils.obs.OffHeapBitSet
-
-
Constructor Summary
Constructors Constructor Description OffHeapBitSet(long numBits)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTo(Ref.IdentityCollection identities)
long
capacity()
void
clear()
void
clear(long index)
clears the bit.void
close()
static <I extends java.io.InputStream & java.io.DataInput>
OffHeapBitSetdeserialize(I in, boolean oldBfFormat)
boolean
equals(java.lang.Object o)
boolean
get(long index)
Returns true or false for the specified bit index.int
hashCode()
long
offHeapSize()
Returns the amount of memory in bytes used off heap.void
serialize(DataOutputPlus out)
long
serializedSize()
void
serializeOldBfFormat(DataOutputPlus out)
void
set(long index)
Sets the bit at the specified index.void
set(long offset, byte b)
java.lang.String
toString()
-
-
-
Method Detail
-
offHeapSize
public long offHeapSize()
Description copied from interface:IBitSet
Returns the amount of memory in bytes used off heap.- Specified by:
offHeapSize
in interfaceIBitSet
- Returns:
- the amount of memory in bytes used off heap
-
addTo
public void addTo(Ref.IdentityCollection identities)
-
get
public boolean get(long index)
Description copied from interface:IBitSet
Returns true or false for the specified bit index. The index should be less than the capacity.
-
set
public void set(long index)
Description copied from interface:IBitSet
Sets the bit at the specified index. The index should be less than the capacity.
-
set
public void set(long offset, byte b)
-
clear
public void clear(long index)
Description copied from interface:IBitSet
clears the bit. The index should be less than the capacity.
-
serialize
public void serialize(DataOutputPlus out) throws java.io.IOException
-
serializeOldBfFormat
public void serializeOldBfFormat(DataOutputPlus out) throws java.io.IOException
- Throws:
java.io.IOException
-
serializedSize
public long serializedSize()
- Specified by:
serializedSize
in interfaceIBitSet
-
deserialize
public static <I extends java.io.InputStream & java.io.DataInput> OffHeapBitSet deserialize(I in, boolean oldBfFormat) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-