private void resize ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "resize" , table . length ) ; Entry [ ] newTable = new Entry [ table . length + ( table . length / 2 ) ] ; /* We have to walk the entire SchemaSet, rehashing each Entry and putting */ /* it in its new home. As contains() may be running at the same time, we */ /* have to create a new Entry instance for each. */ for ( int i = 0 ; i < table . length ; i ++ ) { Entry ent = table [ i ] ; Entry newEntry ; int j ; while ( ent != null ) { j = hashToTable ( ent . schemaId , newTable ) ; newEntry = new Entry ( ent . schemaId , newTable [ j ] ) ; newTable [ j ] = newEntry ; ent = ent . next ; } } /* Now replace the old table with the new one. */ table = newTable ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "resize" , table . length ) ; }
Resize the SchemaSet adding 50% to the size .