public synchronized void removeClosedEvaluator ( final EvaluatorManager evaluatorManager ) { final String evaluatorId = evaluatorManager . getId ( ) ; LOG . log ( Level . FINE , "Removing closed evaluator: {0}" , evaluatorId ) ; if ( ! evaluatorManager . isClosed ( ) ) { throw new IllegalArgumentException ( "Removing evaluator that has not been closed yet: " + evaluatorId ) ; } if ( ! this . evaluators . containsKey ( evaluatorId ) && ! this . closedEvaluatorIds . contains ( evaluatorId ) ) { throw new IllegalArgumentException ( "Removing unknown evaluator: " + evaluatorId ) ; } if ( ! this . evaluators . containsKey ( evaluatorId ) && this . closedEvaluatorIds . contains ( evaluatorId ) ) { LOG . log ( Level . FINE , "Removing closed evaluator which has already been removed: {0}" , evaluatorId ) ; return ; } evaluatorManager . shutdown ( ) ; this . evaluators . remove ( evaluatorId ) ; this . closedEvaluatorIds . add ( evaluatorId ) ; LOG . log ( Level . FINEST , "Closed evaluator removed: {0}" , evaluatorId ) ; }
Moves evaluator from map of active evaluators to set of closed evaluators .