Ejemplo n.º 1
1
 /** @deprecated unused */
 public Map<String, Long> getTimestamps() {
   if (_log.shouldLog(Log.INFO)) {
     synchronized (this) {
       locked_initTimestamps();
       return (Map<String, Long>) _timestamps.clone();
     }
   }
   return Collections.EMPTY_MAP;
 }
Ejemplo n.º 2
0
 /** @deprecated unused */
 public Long getTimestamp(String eventName) {
   if (_log.shouldLog(Log.INFO)) {
     synchronized (this) {
       locked_initTimestamps();
       return _timestamps.get(eventName);
     }
   }
   return Long.valueOf(0);
 }
Ejemplo n.º 3
0
 /**
  * Stamp the message's progress. Only useful if log level is INFO or DEBUG
  *
  * @param eventName what occurred
  * @return how long this message has been 'in flight'
  */
 public long timestamp(String eventName) {
   long now = _context.clock().now();
   if (_log.shouldLog(Log.INFO)) {
     // only timestamp if we are debugging
     synchronized (this) {
       locked_initTimestamps();
       // ???
       // while (_timestamps.containsKey(eventName)) {
       //    eventName = eventName + '.';
       // }
       _timestamps.put(eventName, Long.valueOf(now));
       _timestampOrder.add(eventName);
     }
   }
   return now - _created;
 }