public void onEndJob ( @ Nullable final String sJobID , @ Nonnull final ESuccess eExecSucess , @ Nonnull final LongRunningJobResult aResult ) { ValueEnforcer . notNull ( eExecSucess , "ExecSuccess" ) ; ValueEnforcer . notNull ( aResult , "Result" ) ; // Remove from running job list final LongRunningJobData aJobData = m_aRWLock . writeLocked ( ( ) -> { final LongRunningJobData ret = m_aRunningJobs . remove ( sJobID ) ; if ( ret == null ) throw new IllegalArgumentException ( "Illegal job ID '" + sJobID + "' passed!" ) ; // End the job - inside the writeLock ret . onJobEnd ( eExecSucess , aResult ) ; return ret ; } ) ; // Remember it m_aResultMgr . addResult ( aJobData ) ; }
End a job .