Interface IntrusiveSoftLRU.Adapter<T>
- Type Parameters:
T
-
- All Known Implementing Classes:
IntrusiveSoftLRU.Node.Adapter
- Enclosing class:
- IntrusiveSoftLRU<T>
public static interface IntrusiveSoftLRU.Adapter<T>
An interface defining the required intrusive property getters and setters. Users should not directly call these
methods, or they risk corrupting the internal data structure.
-
Method Summary
Modifier and TypeMethodDescriptionGet aSoftReference
object which refers to the object being cached and will act as its "owner" in the cache.int
Get the slot in which the object is stored in the cache.void
Set the slot in which the reference is stored in the cache.
-
Method Details
-
getOwner
Get aSoftReference
object which refers to the object being cached and will act as its "owner" in the cache.- Parameters:
cachedObject
- the object being cached.- Returns:
- a
SoftReference
that refers to the item and will act as its "owner" in the cache.
-
getSlot
Get the slot in which the object is stored in the cache.- Parameters:
cachedObject
- the being cached.- Returns:
- the slot for the object.
-
setSlot
Set the slot in which the reference is stored in the cache.- Parameters:
cachedObject
- the object being cached.slot
- the slot where it will be stored.
-