OffHeapBitSet (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.utils.obs

## Class OffHeapBitSet

- java.lang.Object
- - org.apache.cassandra.utils.obs.OffHeapBitSet

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, IBitSet

      public class OffHeapBitSet
      extends java.lang.Object
      implements IBitSet

  Off-heap bitset, file compatible with OpeBitSet

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OffHeapBitSet(long numBits)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `capacity()`
    `void` | `clear()`
    `void` | `clear(long index)` clears the bit.
    `void` | `close()`
    `static OffHeapBitSet` | `deserialize(java.io.DataInput in)`
    `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 out)`
    `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 out)
                         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 in)
                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in interface `IBitSet`

    - #### 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 © 2014 The Apache Software Foundation