Methods Summary |
---|
public long | getCreationTime()
return creationTime;
|
public int | getId()Each object can have an unique id, similar with name but
providing faster access ( array vs. hashtable lookup )
return id;
|
public long | getLastAccessedTime()
return lastAccessedTime;
|
public long | getMaxInactiveInterval()Inactive interval in millis - the time is computed
in millis, convert to secs in the upper layer
return maxInactiveInterval;
|
public org.apache.tomcat.util.buf.MessageBytes | getName()Return the "name" of the timestamp. This can be used
to associate unique identifier with each timestamped object.
The name is a MessageBytes - i.e. a modifiable byte[] or char[].
if( name==null ) name=MessageBytes.newInstance();//lazy
return name;
|
public java.lang.Object | getParent()
return parent;
|
public boolean | isNew()
return isNew;
|
public boolean | isValid()
return isValid;
|
public void | recycle()
creationTime = 0L;
lastAccessedTime = 0L;
maxInactiveInterval = -1;
isNew = true;
isValid = false;
id=-1;
if( name!=null) name.recycle();
|
public void | setCreationTime(long time)
this.creationTime = time;
this.lastAccessedTime = time;
this.thisAccessedTime = time;
|
public void | setId(int id)
this.id=id;
|
public void | setMaxInactiveInterval(long interval)
maxInactiveInterval = interval;
|
public void | setNew(boolean isNew)
this.isNew = isNew;
|
public void | setParent(java.lang.Object o)Returns the owner of this stamp ( the object that is
time-stamped ).
For a
parent=o;
|
public void | setValid(boolean isValid)
this.isValid = isValid;
|
public void | touch(long time)Access notification. This method takes a time parameter in order
to allow callers to efficiently manage expensive calls to
System.currentTimeMillis()
this.lastAccessedTime = this.thisAccessedTime;
this.thisAccessedTime = time;
this.isNew=false;
|