private int decrementReferenceCounter ( final JobID jobID ) { final AtomicInteger ai = this . libraryReferenceCounter . get ( jobID ) ; if ( ai == null ) { throw new IllegalStateException ( "Cannot find reference counter entry for job " + jobID ) ; } int retVal = ai . decrementAndGet ( ) ; if ( retVal == 0 ) { this . libraryReferenceCounter . remove ( jobID ) ; } return retVal ; }
Decrements the reference counter for the library manager entry with the given job ID .