Interface HashHandler

All Known Implementing Classes:
HashHandler.BuildHandler, HashHandler.ProbeHandler

public interface HashHandler
Callback from generated hash table code.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    When building, this operation is never invoked.
    static class 
    When probing, these operations are never invoked.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doMainFound(int tableLocation, int chunkPosition)
    Called after a value is found in the main hash table
    void
    doMainInsert(int tableLocation, int chunkPosition)
    Called after a value is inserted into the main hash table
    void
    doMissing(int chunkPosition)
    Called during probe when a value is not found in main or overflow.
    void
    doMoveMain(int oldTableLocation, int newTableLocation)
    Called during rehash when a value is moved in the main table
    void
    doOverflowFound(int overflowLocation, int chunkPosition)
    Called after a value is found in the overflow hash table
    void
    doOverflowInsert(int overflowLocation, int chunkPosition)
    Called after a value is inserted into the overflow hash table
    void
    doPromoteOverflow(int overflowLocation, int mainInsertLocation)
    Called during rehash when a value is promoted from overflow to the main table
    void
    onNextChunk(int size)
    Called when the next chunk of data is being processed in build or probe.
  • Method Details

    • doMainInsert

      void doMainInsert(int tableLocation, int chunkPosition)
      Called after a value is inserted into the main hash table
      Parameters:
      tableLocation - location of insertion
      chunkPosition - the position in the chunk
    • doMainFound

      void doMainFound(int tableLocation, int chunkPosition)
      Called after a value is found in the main hash table
      Parameters:
      tableLocation - location in the table
      chunkPosition - the position in the chunk
    • doOverflowInsert

      void doOverflowInsert(int overflowLocation, int chunkPosition)
      Called after a value is inserted into the overflow hash table
      Parameters:
      overflowLocation - location of insertion
      chunkPosition - the position in the chunk
    • doOverflowFound

      void doOverflowFound(int overflowLocation, int chunkPosition)
      Called after a value is found in the overflow hash table
      Parameters:
      overflowLocation - location in the overflow table
      chunkPosition - the position in the chunk
    • doMoveMain

      void doMoveMain(int oldTableLocation, int newTableLocation)
      Called during rehash when a value is moved in the main table
      Parameters:
      oldTableLocation - the old location in the main table
      newTableLocation - the new location in the main table
    • doPromoteOverflow

      void doPromoteOverflow(int overflowLocation, int mainInsertLocation)
      Called during rehash when a value is promoted from overflow to the main table
      Parameters:
      overflowLocation - the old location in the overflow table
      mainInsertLocation - the new location in the main table
    • onNextChunk

      void onNextChunk(int size)
      Called when the next chunk of data is being processed in build or probe.
      Parameters:
      size - the size of the next chunk
    • doMissing

      void doMissing(int chunkPosition)
      Called during probe when a value is not found in main or overflow.
      Parameters:
      chunkPosition - the position in the chunk