public class WeakCacheEntry<T> extends Object implements CacheEntry<T>
| Constructor and Description |
|---|
WeakCacheEntry() |
| Modifier and Type | Method and Description |
|---|---|
String |
getETag()
Get the E-Tag, if there is any
|
long |
getExpirationTimestamp()
Get the expirationValue
|
T |
getValue()
Get the real value of this entry.
|
boolean |
isExpired()
true if this
CacheEntry has Expired, otherwise false. |
void |
setEntryExpirator(CacheEntryExpirator expirator)
Set the
CacheEntryExpirator that is used in CacheEntry.isExpired()
to determine if an CacheEntry is expired or not |
void |
setETag(String eTag) |
void |
setExpirationTimestamp(long expirationValue)
Seht the expiration timestamp, when this entry will expires
|
void |
setValue(WeakReference<T> value) |
String |
toString() |
public void setValue(WeakReference<T> value)
public void setEntryExpirator(CacheEntryExpirator expirator)
CacheEntryCacheEntryExpirator that is used in CacheEntry.isExpired()
to determine if an CacheEntry is expired or notsetEntryExpirator in interface CacheEntry<T>public boolean isExpired()
CacheEntryCacheEntry has Expired, otherwise false. This method
calls CacheEntryExpirator#isExpired(Object) to determine if the
entry has expired or not.isExpired in interface CacheEntry<T>public T getValue()
CacheEntrygetValue in interface CacheEntry<T>public void setExpirationTimestamp(long expirationValue)
CacheEntrysetExpirationTimestamp in interface CacheEntry<T>public long getExpirationTimestamp()
CacheEntrygetExpirationTimestamp in interface CacheEntry<T>public String getETag()
CacheEntrygetETag in interface CacheEntry<T>public void setETag(String eTag)
Copyright © 2015 Hannes Dorfmann. All rights reserved.