private final void initialize( final int initial_sz ) { if( initial_sz < 0 ) throw new IllegalArgumentException(); int i; // Convert to next largest power-of-2 for( i=MIN_SIZE_LOG; (1<<i) < initial_sz; i++ ) ; _chm = new CHM(this,new ConcurrentAutoTable(),i); _val_1 = TOMBSTONE; // Always as-if deleted _last_resize_milli = System.currentTimeMillis(); }
newchm = new CHM(_nbhml,_size,log2);
/** Removes all of the mappings from this map. */ public void clear() { // Smack a new empty table down CHM newchm = new CHM(this,new ConcurrentAutoTable(),MIN_SIZE_LOG); while( !CAS(_chm_offset,_chm,newchm) ) // Spin until the clear works ; CAS(_val_1_offset,_val_1,TOMBSTONE); }