|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.exec.persistence.MRU<T>
public class MRU<T extends DCLLItem>
An MRU (Most Recently Used) cache implementation. This implementation maintains a doubly circular linked list and it can be used with an auxiliary data structure such as a HashMap to locate the item quickly.
Constructor Summary | |
---|---|
MRU()
|
Method Summary | |
---|---|
void |
clear()
Clear all elements in the MRU list. |
T |
head()
Get the most recently used. |
void |
moveToHead(T v)
Move an existing item to the head. |
T |
put(T item)
Insert a value into the MRU. |
void |
remove(T v)
Remove a item from the MRU list. |
T |
tail()
Get the least recently used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MRU()
Method Detail |
---|
public T put(T item)
public void remove(T v)
v
- linked list item.public T head()
public T tail()
public void moveToHead(T v)
v
- the linked list item to be moved to the head.public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |