@ Override public void run ( ) { long timeS = System . currentTimeMillis ( ) ; initPath ( ) ; ensureFileExists ( ) ; try { loadAllChemComps ( ) ; long timeE = System . currentTimeMillis ( ) ; logger . debug ( "Time to init chem comp dictionary: " + ( timeE - timeS ) / 1000 + " sec." ) ; } catch ( IOException e ) { logger . error ( "Could not load chemical components definition file {}. Error: {}" , getLocalFileName ( ) , e . getMessage ( ) ) ; } finally { loading . set ( false ) ; isInitialized . set ( true ) ; } }
Do the actual loading of the dictionary in a thread .