org.aksw.commons.graph
Class DefaultCacheProvider

java.lang.Object
  extended by org.aksw.commons.graph.DefaultCacheProvider
All Implemented Interfaces:
ICacheProvider, IGraphListener

public class DefaultCacheProvider
extends Object
implements ICacheProvider, IGraphListener


Constructor Summary
DefaultCacheProvider(IGraph graph)
           
 
Method Summary
 void addSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
          Adds seen triples to the cache.
 Set<com.hp.hpl.jena.graph.Triple> bulkFind(Set<List<Object>> keys, int[] indexColumns)
           
 void clear()
          Clears all caches
 IGraph getGraph()
           
 Collection<ITripleCacheIndex> getIndexes()
           
 void onAdd(IGraph g, Collection<com.hp.hpl.jena.graph.Triple> triples)
           
 void onRemove(IGraph g, Collection<com.hp.hpl.jena.graph.Triple> triples)
           
 void removeSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultCacheProvider

public DefaultCacheProvider(IGraph graph)
Method Detail

clear

public void clear()
Description copied from interface: ICacheProvider
Clears all caches

Specified by:
clear in interface ICacheProvider

bulkFind

public Set<com.hp.hpl.jena.graph.Triple> bulkFind(Set<List<Object>> keys,
                                                  int[] indexColumns)
Specified by:
bulkFind in interface ICacheProvider

addSeen

public void addSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
Description copied from interface: ICacheProvider
Adds seen triples to the cache. Partitions are updated accodingly. The completeness state of partitions is left unaffected. Do not call these methods directly - only the graph should do this.

Specified by:
addSeen in interface ICacheProvider

removeSeen

public void removeSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
Specified by:
removeSeen in interface ICacheProvider

getGraph

public IGraph getGraph()
Specified by:
getGraph in interface ICacheProvider

getIndexes

public Collection<ITripleCacheIndex> getIndexes()
Specified by:
getIndexes in interface ICacheProvider

toString

public String toString()
Overrides:
toString in class Object

onAdd

public void onAdd(IGraph g,
                  Collection<com.hp.hpl.jena.graph.Triple> triples)
Specified by:
onAdd in interface IGraphListener

onRemove

public void onRemove(IGraph g,
                     Collection<com.hp.hpl.jena.graph.Triple> triples)
Specified by:
onRemove in interface IGraphListener


Copyright © 2012. All Rights Reserved.