Skip to content

Instantly share code, notes, and snippets.

@ldclakmal
Created June 6, 2020 14:59
Show Gist options
  • Save ldclakmal/0822cae9920390f7f8b4faf54eb9d0e1 to your computer and use it in GitHub Desktop.
Save ldclakmal/0822cae9920390f7f8b4faf54eb9d0e1 to your computer and use it in GitHub Desktop.
Abstract Eviction Policy of Ballerina
public type AbstractEvictionPolicy abstract object {
public function get(LinkedList list, Node node);
public function put(LinkedList list, Node node);
public function remove(LinkedList list, Node node);
public function replace(LinkedList list, Node newNode, Node oldNode);
public function clear(LinkedList list);
public function evict(LinkedList list) returns Node?;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment