net.dontdrinkandroot.cache.metadata.impl
Class BlockMetaData

java.lang.Object
  extended by net.dontdrinkandroot.cache.metadata.impl.BlockMetaData
All Implemented Interfaces:
Serializable, MetaData

public class BlockMetaData
extends Object
implements MetaData

Author:
Philip W. Sorst
See Also:
Serialized Form

Constructor Summary
BlockMetaData(IndexData indexData, SimpleMetaData metaData)
           
 
Method Summary
 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.
 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()
           
 boolean isExpired()
          Check if the entry is expired.
 boolean isIdledAway()
          Check if the entry has not been accessed within the idle period.
 void update()
          Update the entry after a cache hit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockMetaData

public BlockMetaData(IndexData indexData,
                     SimpleMetaData metaData)
Method Detail

isExpired

public boolean isExpired()
Description copied from interface: MetaData
Check if the entry is expired.

Specified by:
isExpired in interface MetaData

isIdledAway

public boolean isIdledAway()
Description copied from interface: MetaData
Check if the entry has not been accessed within the idle period.

Specified by:
isIdledAway in interface MetaData

getExpiry

public long getExpiry()
Description copied from interface: MetaData
Get the timestamp when the entry expires.

Specified by:
getExpiry in interface MetaData

getMaxIdleTime

public long getMaxIdleTime()
Description copied from interface: MetaData
Get the maximum time that the entry may idle (not being accessed) before being evicted (in milliseconds).

Specified by:
getMaxIdleTime in interface MetaData

update

public void update()
Description copied from interface: MetaData
Update the entry after a cache hit.

Specified by:
update in interface MetaData

getHitCount

public long getHitCount()
Description copied from interface: MetaData
Get the number of hits.

Specified by:
getHitCount in interface MetaData

getLastAccess

public long getLastAccess()
Description copied from interface: MetaData
Get the timestamp when the entry was last accessed.

Specified by:
getLastAccess in interface MetaData

getCreated

public long getCreated()
Description copied from interface: MetaData
Get the timestamp when the entry was created.

Specified by:
getCreated in interface MetaData

getMetaData

public SimpleMetaData getMetaData()

getIndexData

public IndexData getIndexData()


Copyright © 2013 dontdrinkandroot. All Rights Reserved.