/** * 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; } }
/** 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(); } }
/** * 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(); }