public boolean setCancellerHandle ( ScheduledFuture < ? > cancellerHandle ) { synchronized ( lock ) { if ( this . cancellerHandle == null ) { if ( ! discarded ) { this . cancellerHandle = cancellerHandle ; return true ; } else { return false ; } } else { throw new IllegalStateException ( "A canceller handle was already set" ) ; } } }
Sets the handle for the canceller to this pending checkpoint . This method fails with an exception if a handle has already been set .