public class SimpleMetaData extends Object implements MetaData
| Constructor and Description |
|---|
SimpleMetaData(long expiry) |
SimpleMetaData(long created,
long expiry) |
SimpleMetaData(long created,
long expiry,
long maxIdleTime) |
| Modifier and Type | Method and Description |
|---|---|
long |
getCreated()
Get the timestamp when the entry was created.
|
long |
getExpiry()
Get the timestamp when the entry expires.
|
long |
getHitCount()
Get the number of hits.
|
long |
getLastAccess()
Get the timestamp when the entry was last accessed.
|
long |
getMaxIdleTime()
Get the maximum time that the entry may idle (not being accessed) before being evicted (in
milliseconds).
|
void |
increaseCount() |
boolean |
isExpired()
Check if the entry is expired.
|
boolean |
isIdledAway()
Check if the entry has not been accessed within the idle period.
|
void |
resetCount() |
void |
setCount(int count) |
void |
setLastAccess(long lastAccess) |
void |
update()
Update the entry after a cache hit.
|
public SimpleMetaData(long expiry)
public SimpleMetaData(long created,
long expiry)
public SimpleMetaData(long created,
long expiry,
long maxIdleTime)
public final long getExpiry()
MetaDatapublic final void update()
MetaDatapublic final long getLastAccess()
MetaDatagetLastAccess in interface MetaDatapublic final long getHitCount()
MetaDatagetHitCount in interface MetaDatapublic boolean isExpired()
MetaDatapublic long getCreated()
MetaDatagetCreated in interface MetaDatapublic boolean isIdledAway()
MetaDataisIdledAway in interface MetaDatapublic long getMaxIdleTime()
MetaDatagetMaxIdleTime in interface MetaDatapublic final void setCount(int count)
public final void setLastAccess(long lastAccess)
public final void resetCount()
public final void increaseCount()
Copyright © 2013 dontdrinkandroot. All Rights Reserved.