public synchronized String printStack() {
    StringBuilder sb = new StringBuilder();
    Set<Map.Entry<String, TraceObject>> set = entrySet();
    for (Map.Entry<String, TraceObject> entry : set) {
      TraceObject traceObj = entry.getValue();
      String key = entry.getKey();
      String indicator = "";

      switch (traceObj.getIndicatorFlag()) {
        case TraceObject.NOT_COMPRESSED:
          break;

        case TraceObject.COMPRESSED_PROTOCOL_NOT_COMPRESSED_PACKET:
          indicator = " (compressed protocol - packet not compressed)";
          break;

        case TraceObject.COMPRESSED_PROTOCOL_COMPRESSED_PACKET:
          indicator = " (compressed protocol - packet compressed)";
          break;

        default:
          break;
      }

      if (traceObj.isSend()) {
        sb.append("\nsend at -exchange:");
      } else {
        sb.append("\nread at -exchange:");
      }

      sb.append(key).append(indicator)
          .append(Utils.hexdump(traceObj.getBuf()));

      traceObj.remove();
    }
    this.clear();
    return sb.toString();
  }
public synchronized String printStack ( ) { StringBuilder sb = new StringBuilder ( ) ; Set < Map . Entry < String , TraceObject > > set = entrySet ( ) ; for ( Map . Entry < String , TraceObject > entry : set ) { TraceObject traceObj = entry . getValue ( ) ; String key = entry . getKey ( ) ; String indicator = "" ; switch ( traceObj . getIndicatorFlag ( ) ) { case TraceObject . NOT_COMPRESSED : break ; case TraceObject . COMPRESSED_PROTOCOL_NOT_COMPRESSED_PACKET : indicator = " (compressed protocol - packet not compressed)" ; break ; case TraceObject . COMPRESSED_PROTOCOL_COMPRESSED_PACKET : indicator = " (compressed protocol - packet compressed)" ; break ; default : break ; } if ( traceObj . isSend ( ) ) { sb . append ( "\nsend at -exchange:" ) ; } else { sb . append ( "\nread at -exchange:" ) ; } sb . append ( key ) . append ( indicator ) . append ( Utils . hexdump ( traceObj . getBuf ( ) ) ) ; traceObj . remove ( ) ; } this . clear ( ) ; return sb . toString ( ) ; }
Value of trace cache in a readable format.

@return trace cache value