public class LRUCache
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LRUCache.LRUNode
Interface for nodes in the LRU cache, basicly nodes in a doubly
linked list.
|
static interface |
LRUCache.LRUObj
Interface for object participating in the LRU Cache.
|
Constructor and Description |
---|
LRUCache(int size) |
Modifier and Type | Method and Description |
---|---|
void |
add(LRUCache.LRUObj obj) |
void |
flush() |
int |
getUsed() |
protected void |
print() |
void |
remove(LRUCache.LRUObj obj) |
void |
setSize(int newSz) |
void |
touch(LRUCache.LRUObj obj) |
public int getUsed()
public void setSize(int newSz)
public void flush()
public void remove(LRUCache.LRUObj obj)
public void touch(LRUCache.LRUObj obj)
public void add(LRUCache.LRUObj obj)
protected void print()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.