Class Node

java.lang.Object
org.roaringbitmap.art.Node
Direct Known Subclasses:
BranchNode, LeafNode

public abstract class Node extends Object
  • Constructor Details

    • Node

      public Node()
  • Method Details

    • clone

      protected abstract Node clone()
      Overrides:
      clone in class Object
    • sortSmallByteArray

      protected static byte[] sortSmallByteArray(byte[] key, Node[] children, int left, int right)
      sort the small arrays through the insertion sort alg.
    • serialize

      public void serialize(DataOutput dataOutput) throws IOException
      serialize
      Parameters:
      dataOutput - the DataOutput
      Throws:
      IOException - signal a exception happened while the serialization
    • serialize

      public void serialize(ByteBuffer byteBuffer) throws IOException
      serialize
      Parameters:
      byteBuffer - the ByteBuffer
      Throws:
      IOException - signal a exception happened while the serialization
    • serializeSizeInBytes

      public int serializeSizeInBytes()
      the serialized size in bytes of this node
      Returns:
      the size in bytes
    • deserialize

      public static Node deserialize(DataInput dataInput) throws IOException
      deserialize into a typed node from the byte stream
      Parameters:
      dataInput - the input byte stream
      Returns:
      the typed node
      Throws:
      IOException - indicate a exception happened
    • deserialize

      public static Node deserialize(ByteBuffer byteBuffer) throws IOException
      deserialize into a typed node
      Parameters:
      byteBuffer - the ByteBuffer
      Returns:
      the typed node
      Throws:
      IOException - indicate a exception happened
    • serializeNodeBodySizeInBytes

      public abstract int serializeNodeBodySizeInBytes()
      the serialized size except the common node header part
      Returns:
      the size in bytes
    • serializeHeader

      protected abstract void serializeHeader(DataOutput dataOutput) throws IOException
      Throws:
      IOException
    • serializeHeader

      protected abstract void serializeHeader(ByteBuffer byteBuffer) throws IOException
      Throws:
      IOException
    • serializeHeaderSizeInBytes

      protected int serializeHeaderSizeInBytes()