iitb.con.indexing
Class IndexCache

java.lang.Object
  extended by iitb.con.indexing.IndexCache

public class IndexCache
extends java.lang.Object

Caches the meta-index of the index structure. Basically it caches the non-leaf nodes of the index tree, which improves the query search.


Method Summary
 void clear()
          Clears the Index Cache List
static IndexCache getInstance()
          Singleton method to get the IndexCache instance
<K extends java.lang.Comparable<K>>
int[]
getInstancesIds(short typeId, java.lang.String attributeName, K value)
          Retrieves the instance ids from the index for the specified type's attribute.
If index is not present in the cache, it is read from the index file and placed in the cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public void clear()
Clears the Index Cache List


getInstance

public static IndexCache getInstance()
Singleton method to get the IndexCache instance

Returns:
IndexCache instance

getInstancesIds

public <K extends java.lang.Comparable<K>> int[] getInstancesIds(short typeId,
                                                                 java.lang.String attributeName,
                                                                 K value)
Retrieves the instance ids from the index for the specified type's attribute.
If index is not present in the cache, it is read from the index file and placed in the cache.

Type Parameters:
K - attribute data type
Parameters:
typeId - type id
attributeName - attribute name
value - attribute value
Returns:
instance ids as int array