T
- value type@ThreadSafe public final class FifoCache<T> extends Object
Constructor and Description |
---|
FifoCache(int maxSize) |
Modifier and Type | Method and Description |
---|---|
T |
add(String key,
T value)
Adds an entry to the cache, evicting the earliest entry if necessary.
|
T |
get(String key)
Returns the value of the given key; or null of no such entry exists.
|
int |
getMaxSize()
Returns the maximum size of the cache.
|
int |
size()
Returns the current size of the cache.
|
String |
toString() |
public FifoCache(int maxSize)
maxSize
- the maximum number of entries of the cacheCopyright © 2019. All rights reserved.