edu.utdallas.paged.mem.cache
Class CachePredicate

java.lang.Object
  extended by edu.utdallas.paged.mem.cache.CacheBase
      extended by edu.utdallas.paged.mem.cache.CachePredicate

public class CachePredicate
extends CacheBase

A specific implementation of the buffer based on caching the values of predicates only

Author:
vaibhav

Field Summary
 
Fields inherited from class edu.utdallas.paged.mem.cache.CacheBase
delayFactor, graphId, hashMap, id, isFileCreated, isObjFileCreated, isPredFileCreated, isSubFileCreated, luceneWriter, objF, objWriter, predF, predWriter, size, subF, subWriter, timestamp, writeObject, writeSubject
 
Constructor Summary
CachePredicate()
          Constructor
 
Method Summary
 java.lang.Object[] getFiles()
          Method to return the indexes
 void updateCache(edu.utdallas.paged.mem.PagedNodeToTriplesMapBase subjects, edu.utdallas.paged.mem.PagedNodeToTriplesMapBase predicates, edu.utdallas.paged.mem.PagedNodeToTriplesMapBase objects, CacheAlgorithmBase algoSub, CacheAlgorithmBase algoPred, CacheAlgorithmBase algoObj, com.hp.hpl.jena.graph.Triple t)
          Method to update entries in the buffer based on the current triple
 void writeToDisk(edu.utdallas.paged.mem.PagedNodeToTriplesMapBase subjects, edu.utdallas.paged.mem.PagedNodeToTriplesMapBase predicates, edu.utdallas.paged.mem.PagedNodeToTriplesMapBase objects)
          Method that actually creates the indexes and writes triples to the lucene indexes based on the memory management algorithm that we use
 
Methods inherited from class edu.utdallas.paged.mem.cache.CacheBase
calculateIndividualClustering, calculateTransitiveClustering, createCacheEntry, getKeyFromValue, getTriples, removePunctuation, removeTripleBunch, updateTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachePredicate

public CachePredicate()
Constructor

Method Detail

getFiles

public java.lang.Object[] getFiles()
Method to return the indexes

Specified by:
getFiles in class CacheBase
Returns:
The indexes as an array of Objects

updateCache

public void updateCache(edu.utdallas.paged.mem.PagedNodeToTriplesMapBase subjects,
                        edu.utdallas.paged.mem.PagedNodeToTriplesMapBase predicates,
                        edu.utdallas.paged.mem.PagedNodeToTriplesMapBase objects,
                        CacheAlgorithmBase algoSub,
                        CacheAlgorithmBase algoPred,
                        CacheAlgorithmBase algoObj,
                        com.hp.hpl.jena.graph.Triple t)
Method to update entries in the buffer based on the current triple

Specified by:
updateCache in class CacheBase
Parameters:
subjects - - the subjects data structure
predicates - - the predicates data structure
objects - - the objects data structure
algoSub - - the algorithm instance to be used with subjects
algoPred - - the algorithm instance to be used with predicates
algoObj - - the algorithm instance to be used with objects

writeToDisk

public void writeToDisk(edu.utdallas.paged.mem.PagedNodeToTriplesMapBase subjects,
                        edu.utdallas.paged.mem.PagedNodeToTriplesMapBase predicates,
                        edu.utdallas.paged.mem.PagedNodeToTriplesMapBase objects)
Method that actually creates the indexes and writes triples to the lucene indexes based on the memory management algorithm that we use

Specified by:
writeToDisk in class CacheBase
Parameters:
subjects - - the subjects data structure
predicates - - the predicates data structure
objects - - the objects data structure