void reset ( int hashTableSize , int capacity ) { // A VoltDB extension to diagnose ArrayOutOfBounds. if ( linkTable != null ) { voltDBresetCapacity = linkTable . length ; } ++ voltDBresetCount ; voltDBlastResetEvent = voltDBhistoryDepth ; voltDBhistoryCapacity = Math . min ( voltDBhistoryMaxCapacity , Math . max ( voltDBhistoryMinCapacity , voltDBhistoryDepth ) ) ; voltDBhistory = new int [ voltDBhistoryCapacity ] ; // End of VoltDB extension int [ ] newHT = new int [ hashTableSize ] ; int [ ] newLT = new int [ capacity ] ; // allocate memory before assigning hashTable = newHT ; linkTable = newLT ; resetTables ( ) ; }
Reset the structure with a new size as empty .