Class FifoCache<T>
- java.lang.Object
-
- software.amazon.awssdk.auth.signer.internal.FifoCache<T>
-
- Type Parameters:
T
- value type
@ThreadSafe public final class FifoCache<T> extends Object
A bounded cache that has a FIFO eviction policy when the cache is full.
-
-
Constructor Summary
Constructors Constructor Description FifoCache(int maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-