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 datastructure.
-
Method Summary
Modifier and Type Method Description SoftReference<T>
getOwner(T cachedObject)
Get theSoftReference
object which owns the object being cached.int
getSlot(T cachedObject)
Get the slot in which the reference is stored in the cache.void
setSlot(T cachedObject, int slot)
Set the slot in which the reference is stored in the cache.
-
Method Details
-
getOwner
Get theSoftReference
object which owns the object being cached.- Parameters:
cachedObject
- the object being cached.- Returns:
- the
SoftReference
that owns the item.
-
getSlot
Get the slot in which the reference 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.
-