| java.lang.Object com.whirlycott.cache.Item
Item | public class Item (Code) | | Wraps an item in the cache and records some information about when it was last used, added, etc.
author: Philip Jacob |
Field Summary | |
protected long | added Relative time that the Item was added to the cache. | protected volatile long | count Number of times that the Item has been accessed. | final protected Object | countLock Lock for the counter. | protected long | expiresAfter Expire this Item after this much time. | protected V | item | protected long | used Relative time that the Item was last used. |
Constructor Summary | |
public | Item(V _item, long _added, long _expiresTime) |
added | protected long added(Code) | | Relative time that the Item was added to the cache.
|
count | protected volatile long count(Code) | | Number of times that the Item has been accessed.
|
countLock | final protected Object countLock(Code) | | Lock for the counter.
|
expiresAfter | protected long expiresAfter(Code) | | Expire this Item after this much time.
|
used | protected long used(Code) | | Relative time that the Item was last used.
|
Item | public Item(V _item, long _added, long _expiresTime)(Code) | | |
getAdded | public synchronized long getAdded()(Code) | | |
getCount | public synchronized long getCount()(Code) | | |
getExpiresAfter | public long getExpiresAfter()(Code) | | |
getItem | public V getItem()(Code) | | Returns the item. |
getUsed | public synchronized long getUsed()(Code) | | |
incrementCount | void incrementCount()(Code) | | |
setCount | public synchronized void setCount(long count)(Code) | | |
setUsed | void setUsed(long _used)(Code) | | |
|
|