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 longprivate final Stringprivate longprivate final WebResponseprivate final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Cache.Entry other) booleaninthashCode()(package private) booleanisStillFresh(long now) Is this cached entry still fresh?voidtouch()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:
compareToin 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:
trueif can keep in the cache- See Also:
-