code: protected void remove(boolean destroy)
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "remove(destroy=" + destroy + ") : " + this);
  
          // Synchronized on the timer to insure the remove from the active map
          // and the cancellation of the task occur together; without another
          // thread re-scheduling the timer at the same time.              RTC107334
          synchronized (this)
          {
              // Regardless whether or not remove was called previously with
              // destroy=false, the timer must be removed from the active timer
              // map again in case another transaction also called to cancel the
              // timer but has since rolled back and rescheduled the timer.
              synchronized (svActiveTimers)
              {
                  svActiveTimers.remove(ivTaskId);
              }
  
              // Destroy must be after remove from active timers map to insure
              // a destroyed timer is never in the active timers map.
              if (destroy)
              {
                  ivDestroyed = true;
              }
  
              if (ivTaskHandler != null)
              {
                  ivTaskHandler.cancel();
                  ivTaskHandler = null;
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "remove");
      }
docs: Removes the timer from the active timers map and cancels all associated
  expiration notifications. Optionally, the timer is permanently destroyed
  such that it cannot be restored; otherwise it may still be restored due
  to a transaction rollback. <p>
  
  @param destroy true indicates the timer should be permanently destroyed;
  otherwise the timer may be restored after a rollback occurs.