private Object syncGetValueFromBucket(FastSyncHashBucket hb, int key, boolean remove) {
        FastSyncHashEntry e = null;
        FastSyncHashEntry last = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "syncGetValueFromBucket: key, remove " + key + " " + remove);
        }
        synchronized (hb) {
            e = hb.root;
            while (e != null) {
                if (e.key == key) {
                    if (remove) {
                        if (last == null) {
                            // this is root
                            hb.root = e.next;
                        } else {
                            last.next = e.next;
                        }
                    }
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                        Tr.exit(tc, "syncGetValueFromBucket: found value in bucket");
                    }
                    return e.value;
                }
                last = e;
                e = e.next;
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "syncGetValueFromBucket-returned null");
        }
        return null;
    }
private Object syncGetValueFromBucket ( FastSyncHashBucket hb , int key , boolean remove ) { FastSyncHashEntry e = null ; FastSyncHashEntry last = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "syncGetValueFromBucket: key, remove " + key + " " + remove ) ; } synchronized ( hb ) { e = hb . root ; while ( e != null ) { if ( e . key == key ) { if ( remove ) { if ( last == null ) { hb . root = e . next ; } else { last . next = e . next ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "syncGetValueFromBucket: found value in bucket" ) ; } return e . value ; } last = e ; e = e . next ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "syncGetValueFromBucket-returned null" ) ; } return null ; }
Internal get from the table which is partially synchronized at the hash
bucket level.

@param hb
a hash bucket to go to.
@param key
the key to retrieve
@param remove
whether to remove it from the table or not
@return value in the table