public class TTLResourceEntry<T> extends ResourceInstance<T>
ResourceEntry that automatically expires after a given number of milliseconds.| Constructor and Description |
|---|
TTLResourceEntry(T resource,
long millisToLive,
boolean closeOnInvalidation) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid() |
void |
onInvalidate() |
getResourceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResourceIfValidpublic TTLResourceEntry(T resource, long millisToLive, boolean closeOnInvalidation)
public boolean isValid()
isValid in interface ResourceEntry<T>isValid in class ResourceInstance<T>public void onInvalidate()
onInvalidate in interface ResourceEntry<T>onInvalidate in class ResourceInstance<T>