Package org.htmlunit
Class Cache.Entry
java.lang.Object
org.htmlunit.Cache.Entry
- All Implemented Interfaces:
Serializable
,Comparable<Cache.Entry>
- Enclosing class:
Cache
A cache entry.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
private final String
private long
private final WebResponse
private final Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(Cache.Entry other) boolean
int
hashCode()
(package private) boolean
isStillFresh
(long now) Is this cached entry still fresh?void
touch()
Updates the last access date.
-
Field Details
-
key_
-
response_
-
value_
-
lastAccess_
private long lastAccess_ -
createdAt_
private final long createdAt_
-
-
Constructor Details
-
Entry
Entry(String key, WebResponse response, Object value)
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Cache.Entry>
-
equals
-
hashCode
public int hashCode() -
touch
public void touch()Updates the last access date. -
isStillFresh
boolean isStillFresh(long now) Is this cached entry still fresh?- Parameters:
now
- the current time- Returns:
true
if can keep in the cache- See Also:
-