Package org.rdfhdt.hdtjena.cache
Class DictionaryCacheLRI
- java.lang.Object
-
- org.rdfhdt.hdtjena.cache.DictionaryCacheLRI
-
- All Implemented Interfaces:
DictionaryCache
public class DictionaryCacheLRI extends java.lang.Object implements DictionaryCache
Least-Recently-Inserted Cache. Removes the oldest entries inserted. Can result in cache misses but it is very fast. It uses an array-based circular buffer to remove old entries- Author:
- mario.arias
-
-
Constructor Summary
Constructors Constructor Description DictionaryCacheLRI(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()org.apache.jena.graph.Nodeget(long id)voidput(long id, org.apache.jena.graph.Node node)longsize()
-
-
-
Method Detail
-
get
public org.apache.jena.graph.Node get(long id)
- Specified by:
getin interfaceDictionaryCache
-
put
public void put(long id, org.apache.jena.graph.Node node)- Specified by:
putin interfaceDictionaryCache
-
size
public long size()
- Specified by:
sizein interfaceDictionaryCache
-
clear
public void clear()
- Specified by:
clearin interfaceDictionaryCache
-
-