com.oroad.stxx.cache
Interface Cacheable

All Known Implementing Classes:
CacheWrapper

public interface Cacheable

Represents an object that can be cached. To avoid having to modify an existing object, use a wrapper class that implements this interface.

Author:
Don Brown

Method Summary
 long getExpiryTime()
          Gets the time (in milliseconds) when this object will expire
 java.lang.Object getIdentifier()
          Gets the identifier for the object
 long getLastAccessedTime()
          Gets the last accessed time in milliseconds
 long getLastModifiedTime()
          Gets the time the object was last modified
 boolean isExpired()
          Returns whether the cached object has expired
 void setLastAccessedTime(long time)
          Sets the last time this object was accessed
 void setLastModifiedTime(long time)
          Sets the last modified time
 

Method Detail

getIdentifier

public java.lang.Object getIdentifier()
Gets the identifier for the object

Returns:
The identifier value

setLastModifiedTime

public void setLastModifiedTime(long time)
Sets the last modified time

Parameters:
time - The last modified time in milliseconds

getLastModifiedTime

public long getLastModifiedTime()
Gets the time the object was last modified

Returns:
The time in milliseconds

getLastAccessedTime

public long getLastAccessedTime()
Gets the last accessed time in milliseconds

Returns:
The lastAccessedTime value

setLastAccessedTime

public void setLastAccessedTime(long time)
Sets the last time this object was accessed

Parameters:
time - Time in milliseconds

getExpiryTime

public long getExpiryTime()
Gets the time (in milliseconds) when this object will expire

Returns:
The expiryTime value

isExpired

public boolean isExpired()
Returns whether the cached object has expired

Returns:
The expired value