Add a method to get the original expiration time from PCData.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@804085 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2009-08-14 05:57:31 +00:00
parent cc29d284b8
commit a1e2f57eb9
2 changed files with 11 additions and 0 deletions

View File

@ -32,4 +32,11 @@ public interface DataCachePCData
* Whether this data is timed out.
*/
public boolean isTimedOut();
/**
* Gets the original timeout of this instance.
*
* @return -1 for no timeout ever.
*/
public long getTimeOut();
}

View File

@ -60,6 +60,10 @@ public class DataCachePCDataImpl
return _exp != -1 && _exp < System.currentTimeMillis();
}
public long getTimeOut() {
return _exp;
}
public synchronized Object getData(int index) {
return super.getData(index);
}