Interface HashHandler
- All Known Implementing Classes:
HashHandler.BuildHandler,HashHandler.ProbeHandler
public interface HashHandler
Callback from generated hash table code.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classWhen building, this operation is never invoked.static classWhen probing, these operations are never invoked. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoMainFound(int tableLocation, int chunkPosition) Called after a value is found in the main hash tablevoiddoMainInsert(int tableLocation, int chunkPosition) Called after a value is inserted into the main hash tablevoiddoMissing(int chunkPosition) Called during probe when a value is not found in main or overflow.voiddoMoveMain(int oldTableLocation, int newTableLocation) Called during rehash when a value is moved in the main tablevoiddoOverflowFound(int overflowLocation, int chunkPosition) Called after a value is found in the overflow hash tablevoiddoOverflowInsert(int overflowLocation, int chunkPosition) Called after a value is inserted into the overflow hash tablevoiddoPromoteOverflow(int overflowLocation, int mainInsertLocation) Called during rehash when a value is promoted from overflow to the main tablevoidonNextChunk(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 insertionchunkPosition- 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 tablechunkPosition- 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 insertionchunkPosition- 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 tablechunkPosition- 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 tablenewTableLocation- 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 tablemainInsertLocation- 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
-