Class IntrusiveSoftLRU.Node.Adapter<T extends IntrusiveSoftLRU.Node<T>>
java.lang.Object
io.deephaven.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
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends IntrusiveSoftLRU.Node<T>>
IntrusiveSoftLRU.Adapter<T>Get 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.
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
getInstance
-
getOwner
Description copied from interface:IntrusiveSoftLRU.Adapter
Get aSoftReference
object which refers to the object being cached and will act as its "owner" in the cache.- Specified by:
getOwner
in interfaceIntrusiveSoftLRU.Adapter<T extends IntrusiveSoftLRU.Node<T>>
- Parameters:
cachedObject
- the object being cached.- Returns:
- a
SoftReference
that refers to the item and will act as its "owner" in the cache.
-
getSlot
Description copied from interface:IntrusiveSoftLRU.Adapter
Get the slot in which the object is stored in the cache.- Specified by:
getSlot
in interfaceIntrusiveSoftLRU.Adapter<T extends IntrusiveSoftLRU.Node<T>>
- Parameters:
cachedObject
- the being cached.- Returns:
- the slot for the object.
-
setSlot
Description copied from interface:IntrusiveSoftLRU.Adapter
Set the slot in which the reference is stored in the cache.- Specified by:
setSlot
in interfaceIntrusiveSoftLRU.Adapter<T extends IntrusiveSoftLRU.Node<T>>
- Parameters:
cachedObject
- the object being cached.slot
- the slot where it will be stored.
-