Class LRUCacheEntry<T>
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.cache.LRUCacheEntry<T>
-
- Type Parameters:
T
- the type of entry keys maintained by the cache.
public class LRUCacheEntry<T> extends java.lang.Object
Cache entry ofLRUCache
. Instances of this class are immutable.
-
-
Constructor Summary
Constructors Constructor Description LRUCacheEntry(T key, long weight, java.time.Instant lastAccessInstant)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getKey()
java.time.Instant
getLastAccessInstant()
long
getWeight()
-
-
-
Constructor Detail
-
LRUCacheEntry
public LRUCacheEntry(T key, long weight, java.time.Instant lastAccessInstant) throws java.lang.IllegalArgumentException
- Parameters:
key
- entry keyweight
- the weight of the cache entry to be reserved.lastAccessInstant
- last used instant of the entry.- Throws:
java.lang.IllegalArgumentException
- when provided parameters have illegal values.
-
-
Method Detail
-
getKey
public T getKey()
-
getWeight
public long getWeight()
-
getLastAccessInstant
public java.time.Instant getLastAccessInstant()
-
-