void registerResume ( RLSSuspendToken token ) throws RLSInvalidSuspendTokenException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerResume" , token ) ; if ( token != null && _tokenMap . containsKey ( token ) ) { // Cast the token to its actual type // RLSSuspendTokenImpl tokenImpl = (RLSSuspendTokenImpl) token; synchronized ( _tokenMap ) { // Remove the token and any associated alarm from the map Alarm alarm = ( Alarm ) _tokenMap . remove ( token /*tokenImpl*/ ) ; // This suspend token is still active - check if // it has an alarm associated with it, and if so, cancel if ( alarm != null ) { alarm . cancel ( ) ; } } } else { // Supplied token is null or could not be found in token map if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "Throw RLSInvalidSuspendTokenException - suspend token is not recognised" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "registerResume" , "RLSInvalidSuspendTokenException" ) ; throw new RLSInvalidSuspendTokenException ( ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "registerResume" ) ; }
Cancels the suspend request that returned the matching RLSSuspendToken . The suspend call s alarm if there is one will also be cancelled