|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.egothor.cache.AbstractNode<K,LruKNode<K>>
org.egothor.cache.lruk.LruKNode<K>
K
- type of the keypublic class LruKNode<K>
Represents a node that can be used as a key for TreeMap
. Uses backward-K-distance to compare nodes.
Field Summary |
---|
Fields inherited from class org.egothor.cache.AbstractNode |
---|
key |
Constructor Summary | |
---|---|
LruKNode(K key,
int numberOfIds)
Constructor for the LruKNode object. |
Method Summary | |
---|---|
int |
compareTo(LruKNode<K> o)
Compares this node with the specified node. |
long |
distance()
Computes the backward-K-distance of this node. |
long |
id(int number)
Returns the number-th last access time of the node. |
long |
lastId()
Returns the oldest stored access time. |
int |
numberOfIds()
Returns number of last accesses stored by the node. |
long |
update()
Updates last access time of this node. |
Methods inherited from class org.egothor.cache.AbstractNode |
---|
equals, getKey, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LruKNode(K key, int numberOfIds)
key
- key associated with the nodenumberOfIds
- number of last references the node should storeMethod Detail |
---|
public long id(int number)
number
- id of the last access time
public long lastId()
public long distance()
public long update()
public int numberOfIds()
public int compareTo(LruKNode<K> o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |