org.apache.cassandra.utils.obs
Class OffHeapBitSet

java.lang.Object
  extended by org.apache.cassandra.utils.obs.OffHeapBitSet
All Implemented Interfaces:
java.io.Closeable, IBitSet

public class OffHeapBitSet
extends java.lang.Object
implements IBitSet

Off-heap bitset, file compatible with OpeBitSet


Constructor Summary
OffHeapBitSet(long numBits)
           
 
Method Summary
 long capacity()
           
 void clear()
           
 void clear(long index)
          clears the bit.
 void close()
           
static OffHeapBitSet deserialize(java.io.DataInput dis)
           
 boolean equals(java.lang.Object o)
           
 boolean get(long index)
          Returns true or false for the specified bit index.
 int hashCode()
           
 void serialize(java.io.DataOutput dos)
           
 long serializedSize(TypeSizes type)
           
 void set(long index)
          Sets the bit at the specified index.
 void set(long offset, byte b)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffHeapBitSet

public OffHeapBitSet(long numBits)
Method Detail

capacity

public long capacity()
Specified by:
capacity in interface IBitSet

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.

Specified by:
get in interface IBitSet

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.

Specified by:
set in interface IBitSet

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.

Specified by:
clear in interface IBitSet

clear

public void clear()
Specified by:
clear in interface IBitSet

serialize

public void serialize(java.io.DataOutput dos)
               throws java.io.IOException
Specified by:
serialize in interface IBitSet
Throws:
java.io.IOException

serializedSize

public long serializedSize(TypeSizes type)
Specified by:
serializedSize in interface IBitSet

deserialize

public static OffHeapBitSet deserialize(java.io.DataInput dis)
                                 throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2013 The Apache Software Foundation