Class IntrusiveSoftLRU.Node.Adapter<T extends IntrusiveSoftLRU.Node<T>>
java.lang.Object
com.illumon.util.datastructures.intrusive.IntrusiveSoftLRU.Node.Adapter<T>
- Type Parameters:
T-
- All Implemented Interfaces:
IntrusiveSoftLRU.Adapter<T>
- Enclosing interface:
- IntrusiveSoftLRU.Node<T extends IntrusiveSoftLRU.Node<T>>
public static class IntrusiveSoftLRU.Node.Adapter<T extends IntrusiveSoftLRU.Node<T>>
extends Object
implements IntrusiveSoftLRU.Adapter<T>
A basic adapter class for
IntrusiveSoftLRU.Node items in the cache.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends IntrusiveSoftLRU.Node<T>>
IntrusiveSoftLRU.Adapter<T>Get aSoftReferenceobject which refers to the object being cached and will act as its "owner" in the cache.intGet the slot in which the object is stored in the cache.voidSet the slot in which the reference is stored in the cache.
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
getInstance
-
getOwner
Description copied from interface:IntrusiveSoftLRU.AdapterGet aSoftReferenceobject which refers to the object being cached and will act as its "owner" in the cache.- Specified by:
getOwnerin interfaceIntrusiveSoftLRU.Adapter<T extends IntrusiveSoftLRU.Node<T>>- Parameters:
cachedObject- the object being cached.- Returns:
- a
SoftReferencethat refers to the item and will act as its "owner" in the cache.
-
getSlot
Description copied from interface:IntrusiveSoftLRU.AdapterGet the slot in which the object is stored in the cache.- Specified by:
getSlotin interfaceIntrusiveSoftLRU.Adapter<T extends IntrusiveSoftLRU.Node<T>>- Parameters:
cachedObject- the being cached.- Returns:
- the slot for the object.
-
setSlot
Description copied from interface:IntrusiveSoftLRU.AdapterSet the slot in which the reference is stored in the cache.- Specified by:
setSlotin interfaceIntrusiveSoftLRU.Adapter<T extends IntrusiveSoftLRU.Node<T>>- Parameters:
cachedObject- the object being cached.slot- the slot where it will be stored.
-