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 voidaddTo(Ref.IdentityCollection identities)longcapacity()voidclear()voidclear(long index)clears the bit.voidclose()static <I extends java.io.InputStream & java.io.DataInput>
OffHeapBitSetdeserialize(I in, boolean oldBfFormat)booleanequals(java.lang.Object o)booleanget(long index)Returns true or false for the specified bit index.inthashCode()longoffHeapSize()Returns the amount of memory in bytes used off heap.voidserialize(DataOutputPlus out)longserializedSize()voidserializeOldBfFormat(DataOutputPlus out)voidset(long index)Sets the bit at the specified index.voidset(long offset, byte b)java.lang.StringtoString()
-
-
-
Method Detail
-
offHeapSize
public long offHeapSize()
Description copied from interface:IBitSetReturns the amount of memory in bytes used off heap.- Specified by:
offHeapSizein 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:IBitSetReturns 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:IBitSetSets 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:IBitSetclears 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:
serializedSizein 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-