Interface Dictionary

All Known Implementing Classes:
StringHashTableDictionary, StringRedBlackTree

public interface Dictionary
Interface to define the dictionary used for encoding value in columns of specific types like string, char, varchar, etc.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
    static interface 
    The interface for visitors.
    static interface 
    The information about each node.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    add(byte[] bytes, int offset, int length)
     
    void
     
    long
     
    getText(int position)
     
    void
    getText(Text result, int position)
    Given the position index, return the original string before being encoded.
    int
     
    void
    Traverse the whole dictionary and apply the action.
    int
    writeTo(OutputStream out, int position)
    Given the position index, write the original string, before being encoded, to the OutputStream.
  • Field Details

  • Method Details

    • visit

      void visit(Dictionary.Visitor visitor) throws IOException
      Traverse the whole dictionary and apply the action.
      Throws:
      IOException
    • clear

      void clear()
    • getText

      void getText(Text result, int position)
      Given the position index, return the original string before being encoded. The value of the Text in the Dictionary is copied into result.
      Parameters:
      result - the holder to copy the dictionary text into
      position - the position where the key was added
    • getText

      ByteBuffer getText(int position)
    • writeTo

      int writeTo(OutputStream out, int position) throws IOException
      Given the position index, write the original string, before being encoded, to the OutputStream.
      Parameters:
      out - the output stream to which to write the data
      position - the position where the key was originally added
      Returns:
      the number of byte written to the stream
      Throws:
      IOException - if an I/O error occurs
    • add

      int add(byte[] bytes, int offset, int length)
    • size

      int size()
    • getSizeInBytes

      long getSizeInBytes()