question: obtain a tree snapshot . this snapshot ensures a consistent view of registrations . the snapshot should be closed as soon as it is not required , because each unclosed instance blocks modification of this tree . concode_field_sep ReadWriteLock rwLock concode_elem_sep RegistrationTreeNode<T> rootNode concode_field_sep RegistrationTreeNode<T> findNodeFor concode_elem_sep void releaseLock concode_elem_sep void removeRegistration concode_elem_sep void addRegistration concode_elem_sep void takeLock
target: RegistrationTreeSnapshot < T > function ( ) { final RegistrationTreeSnapshot < T > loc0 = new RegistrationTreeSnapshot < > ( rwLock . readLock ( ) , rootNode ) ; rwLock . readLock ( ) . lock ( ) ; return loc0 ; }