public void suspend(String id){
  TraceState ts=traceState.get();
  if (log.isLoggable(Level.FINEST)) {
    log.finest("Suspend trace state = " + ts + " id = "+ id);
  }
  if (ts != null) {
    setExpire(ts);
    try {
      suspendedStateLock.lock();
      if (suspendedState.containsKey(id) && log.isLoggable(Level.FINEST)) {
        log.finest("WARNING: Overwriting previous suspended trace state = " + suspendedState.get(id) + " id = "+ id);
      }
      suspendedState.put(id,ts);
      traceState.remove();
    }
  finally {
      suspendedStateLock.unlock();
    }
  }
}

public void suspend ( String id ) { TraceState ts = traceState . get ( ) ; if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Suspend trace state = " + ts + " id = " + id ) ; } if ( ts != null ) { setExpire ( ts ) ; try { suspendedStateLock . lock ( ) ; if ( suspendedState . containsKey ( id ) && log . isLoggable ( Level . FINEST ) ) { log . finest ( "WARNING: Overwriting previous suspended trace state = " + suspendedState . get ( id ) + " id = " + id ) ; } suspendedState . put ( id , ts ) ; traceState . remove ( ) ; } finally { suspendedStateLock . unlock ( ) ; } } }
this method suspends any current trace state , associated with this thread , and associates it with the supplied id . this state can then be re - activated using the resume method .
