public synchronized ChangedFile reserve ( ) { if ( fileList . isEmpty ( ) || shutdown ) { return null ; } String key = fileList . keySet ( ) . iterator ( ) . next ( ) ; ChangedFile changedFile = fileList . remove ( key ) ; reservedFiles . put ( key , changedFile ) ; incrementVersion ( ) ; fireChangedEventAsync ( ) ; return changedFile ; }
Retrieves a changed file for processing and removes it from the list of unreserved files . Returns null if there are no changed files in the list .