Object -
cache
:
AbstractEvictionPolicy
Represents the Ballerina AbstractEvictionPolicy
object and cache eviction related operations
based on a linked list data structure.
Any custom cache implementation should be object-wise similar.
Methods
Update the linked list based on the get operation.
Update the linked list based on the put operation.
Update the linked list based on the remove operation.
Update the linked list based on the replace operation.
Update the linked list based on the clear operation.
Update the linked list based on the evict operation.
Update the linked list based on the get operation.
Parameters
- list LinkedList
-
Linked list data structure
- node Node
-
Node of the linked list, which is retrieved
Update the linked list based on the put operation.
Parameters
- list LinkedList
-
Linked list data structure
- node Node
-
Node of the linked list, which is added newly
Update the linked list based on the remove operation.
Parameters
- list LinkedList
-
Linked list data structure
- node Node
-
Node of the linked list, which is deleted
Update the linked list based on the replace operation.
Parameters
- list LinkedList
-
Linked list data structure
- newNode Node
-
Node of the linked list, which is used for replacing
- oldNode Node
-
Node of the linked list, which will be replaced
Update the linked list based on the clear operation.
Parameters
- list LinkedList
-
Linked list data structure
Update the linked list based on the evict operation.
Parameters
- list LinkedList
-
Linked list data structure
-
Return Type
(Node?) The Node, which should evict from the linked list or
()
if nothing to be evicted