E - class type of object to wrappublic class TimeWrapper<E> extends Object
ObjectPool| Constructor and Description |
|---|
TimeWrapper(E obj,
long expiry)
Creates a new wrapped object.
|
| Modifier and Type | Method and Description |
|---|---|
E |
getObject()
Returns the object referenced by this wrapper.
|
boolean |
isExpired()
Whether this item has expired.
|
public TimeWrapper(E obj, long expiry)
obj - object to be referencedexpiry - object's idle time before death in milliseconds (0 - eternal)public E getObject()
updateAccessed() method.public boolean isExpired()
Copyright © 2015. All rights reserved.