@ Override public void clear ( ) { if ( auto_commit ) { modify ( ) ; nodeCount = 0 ; rootNode [ KEY ] = null ; rootNode [ VALUE ] = null ; } else { String thread_id = getCurrentThreadId ( ) ; ArrayList < Entry < K , V > > list = new ArrayList < Entry < K , V > > ( entrySet ( ) ) ; for ( Iterator < Entry < K , V > > i = list . iterator ( ) ; i . hasNext ( ) ; ) { Node < K , V > node = ( Node < K , V > ) i . next ( ) ; if ( node . is ( Node . ADDED , thread_id ) ) doRedBlackDelete ( node ) ; else { node . setStatus ( Node . DELETED , thread_id ) ; } } } }
Removes all mappings from this map