public class SimpleMetaData extends Object implements MetaData
| Modifier and Type | Field and Description |
|---|---|
static double |
DECAY_FACTOR |
| Constructor and Description |
|---|
SimpleMetaData(long expiry) |
SimpleMetaData(long created,
long expiry) |
SimpleMetaData(long created,
long expiry,
long maxIdleTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
decay()
Decreases the hitcount for use with LRU based expunge strategies.
|
long |
getCreated()
Get the timestamp when the entry was created.
|
long |
getExpiry()
Get the timestamp when the entry expires.
|
int |
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 |
increaseHitCount() |
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 |
update()
Update the entry after a cache hit.
|
public static final double DECAY_FACTOR
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 int 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 void decay()
MetaDatapublic final void resetCount()
public final void increaseHitCount()
Copyright © 2013 dontdrinkandroot. All Rights Reserved.