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 theSoftReferenceobject which owns the object being cached.intgetSlot(T cachedObject)Get the slot in which the reference is stored in the cache.voidsetSlot(T cachedObject, int slot)Set the slot in which the reference is stored in the cache.
-
Method Details
-
getOwner
Get theSoftReferenceobject which owns the object being cached.- Parameters:
cachedObject- the object being cached.- Returns:
- the
SoftReferencethat 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.
-