public class BlockMetaData extends Object implements MetaData
| Constructor and Description |
|---|
BlockMetaData(IndexData indexData,
SimpleMetaData metaData) |
BlockMetaData(SimpleMetaData metaData) |
| 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.
|
IndexData |
getIndexData() |
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).
|
SimpleMetaData |
getMetaData() |
long |
getTimeToLive()
Gets the time to live of this entry (in milliseconds).
|
boolean |
isExpired()
Check if the entry is expired.
|
boolean |
isStale()
Check if the entry has not been accessed within the idle period.
|
void |
setIndexData(IndexData indexData) |
String |
toString() |
void |
update()
Update the entry after a cache hit.
|
public BlockMetaData(IndexData indexData, SimpleMetaData metaData)
public BlockMetaData(SimpleMetaData metaData)
public boolean isExpired()
MetaDatapublic boolean isStale()
MetaDatapublic long getExpiry()
MetaDatapublic long getMaxIdleTime()
MetaDatagetMaxIdleTime in interface MetaDatapublic void update()
MetaDatapublic int getHitCount()
MetaDatagetHitCount in interface MetaDatapublic long getLastAccess()
MetaDatagetLastAccess in interface MetaDatapublic long getCreated()
MetaDatagetCreated in interface MetaDatapublic void decay()
MetaDatapublic long getTimeToLive()
MetaDatagetTimeToLive in interface MetaDatapublic SimpleMetaData getMetaData()
public IndexData getIndexData()
public void setIndexData(IndexData indexData)
Copyright © 2014 dontdrinkandroot. All rights reserved.