public class Cache<K,V> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<K,V> |
cache |
protected boolean |
enableStatistics |
protected long |
hints |
protected int |
limit |
protected long |
removed |
protected long |
requests |
| Constructor and Description |
|---|
Cache(int limit) |
| Modifier and Type | Method and Description |
|---|---|
V |
get(K key) |
long |
getHints() |
int |
getLimit() |
long |
getRequests() |
boolean |
isEnableStatistics() |
void |
put(K key,
V value) |
void |
setEnableStatistics(boolean enableStatistics) |
String |
toString() |
protected int limit
protected boolean enableStatistics
protected long hints
protected long requests
protected long removed
public boolean isEnableStatistics()
public void setEnableStatistics(boolean enableStatistics)
enableStatistics - the enableStatistics to setpublic long getRequests()
public int getLimit()
public long getHints()
Copyright © 2015. All Rights Reserved.