コード例 #1
0
 /**
  * Set the time in ms this object was last used.
  *
  * @param long time in ms
  */
 protected void setLastUsed(long time) {
   if (parent != null) {
     parent.setLastUsed(time);
   } else {
     lastUsed = time;
   }
 }
コード例 #2
0
 /** Set the time this object was last used to the current time in ms. */
 protected void setLastUsed() {
   if (parent != null) {
     parent.setLastUsed();
   } else {
     lastUsed = System.currentTimeMillis();
   }
 }
コード例 #3
0
 /**
  * Add an object to the list of objects being traced.
  *
  * @param AbandonedTrace object to add
  */
 protected void addTrace(AbandonedTrace trace) {
   synchronized (this) {
     this.trace.add(trace);
   }
   setLastUsed();
 }