|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aksw.commons.graph.TripleCacheIndexImpl
public class TripleCacheIndexImpl
FIXME The index could be used with either LRUMaps or Maps for keeping track of the data. So these indexes could be used both as cache or as full indexes.
| Method Summary | ||
|---|---|---|
void |
addSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
Addes triples to the cache. |
|
void |
clear()
|
|
static TripleCacheIndexImpl |
create(IGraph graph,
Integer fullMaxSize,
Integer partialMaxSize,
Integer emptyMaxSize,
int... indexColumns)
|
|
List<Object> |
extractKey(com.hp.hpl.jena.rdf.model.Statement stmt)
|
|
static
|
fill(T[] array,
Iterable<T> items,
int[] map)
|
|
IndexCompatibilityLevel |
getCompatibilityLevel(int[] columnIds)
|
|
IndexCompatibilityLevel |
getCompatibilityLevel(com.hp.hpl.jena.graph.Triple pattern)
Returns the compatibility level for a given pattern |
|
IGraph |
getGraph()
|
|
int[] |
getIndexColumns()
|
|
static com.hp.hpl.jena.rdf.model.RDFNode |
getItemAt(com.hp.hpl.jena.rdf.model.Statement stmt,
int index)
|
|
int[] |
getKeyColumns()
Returns the "columns" that are indexed - columns correspond to 0 = subject, 1 = predicate, 2 = object |
|
static
|
getOrCreate(org.apache.commons.collections15.map.LRUMap<List<? super T>,IndexTable> map,
List<T> key)
|
|
static
|
getOrCreate(Map<List<T>,IndexTable> map,
List<T> key)
|
|
CacheState |
getState()
|
|
int[] |
getValueColumns()
Returns the "columns" for which values are provided by this index |
|
void |
index(Collection<com.hp.hpl.jena.graph.Triple> triples)
Note: When indexing too many triples, the LRU map might be full. |
|
Collection<com.hp.hpl.jena.graph.Triple> |
lookup(List<Object> key)
lookup: returns a possible empty set of triples or null - if no Does not track cache misses. |
|
void |
registerMisses(Set<List<Object>> keys)
|
|
void |
removeSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
Methods which are used to notify the index about new triples |
|
String |
toString()
|
|
static com.hp.hpl.jena.graph.Triple |
toTriple(Object[] array)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public int[] getIndexColumns()
public static TripleCacheIndexImpl create(IGraph graph,
Integer fullMaxSize,
Integer partialMaxSize,
Integer emptyMaxSize,
int... indexColumns)
throws Exception
Exception
public static com.hp.hpl.jena.rdf.model.RDFNode getItemAt(com.hp.hpl.jena.rdf.model.Statement stmt,
int index)
public List<Object> extractKey(com.hp.hpl.jena.rdf.model.Statement stmt)
public static <T> IndexTable getOrCreate(Map<List<T>,IndexTable> map,
List<T> key)
public static <T> IndexTable getOrCreate(org.apache.commons.collections15.map.LRUMap<List<? super T>,IndexTable> map,
List<T> key)
public static <T> void fill(T[] array,
Iterable<T> items,
int[] map)
public static com.hp.hpl.jena.graph.Triple toTriple(Object[] array)
public Collection<com.hp.hpl.jena.graph.Triple> lookup(List<Object> key)
lookup in interface ITripleCacheIndexkey -
public IGraph getGraph()
getGraph in interface ITripleCacheIndexpublic IndexCompatibilityLevel getCompatibilityLevel(com.hp.hpl.jena.graph.Triple pattern)
ITripleCacheIndex
getCompatibilityLevel in interface ITripleCacheIndexpublic void index(Collection<com.hp.hpl.jena.graph.Triple> triples)
index in interface ITripleCacheIndexpublic void removeSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
ITripleCacheIndex
removeSeen in interface ITripleCacheIndexpublic int[] getKeyColumns()
ITripleCacheIndex
getKeyColumns in interface ITripleCacheIndexpublic int[] getValueColumns()
ITripleCacheIndex
getValueColumns in interface ITripleCacheIndexpublic IndexCompatibilityLevel getCompatibilityLevel(int[] columnIds)
getCompatibilityLevel in interface ITripleCacheIndexpublic void addSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
ITripleCacheIndex
addSeen in interface ITripleCacheIndexpublic void clear()
clear in interface ITripleCacheIndexpublic String toString()
toString in class Objectpublic void registerMisses(Set<List<Object>> keys)
registerMisses in interface ITripleCacheIndexpublic CacheState getState()
getState in interface ITripleCacheIndex
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||