com.timeindexing.cache
Class FileIndexCache

java.lang.Object
  extended bycom.timeindexing.cache.DefaultIndexCache
      extended bycom.timeindexing.cache.FileIndexCache
All Implemented Interfaces:
IndexCache

public class FileIndexCache
extends DefaultIndexCache
implements IndexCache

The implementation of a cache which holds the index items for file indexes.


Constructor Summary
FileIndexCache(StoredIndex index)
          Create a FileIndexCache object.
 
Method Summary
 boolean clear()
          Clear the whole cache
 IndexItem getItem(long pos)
          Get an Index Item from the Index.
 boolean hollowItem(long pos)
          Hollow the IndexItem at the position.
 boolean removeItem(long pos)
          Remove the IndexItem at the speicifed position.
 
Methods inherited from class com.timeindexing.cache.DefaultIndexCache
addItem, addItem, containsItem, containsItem, getDataVolume, getFirstDataTime, getFirstIndexTime, getItem, getLastDataTime, getLastIndexTime, getPolicy, hollowItem, removeItem, setPolicy, size, sparce
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.timeindexing.cache.IndexCache
addItem, addItem, containsItem, containsItem, getDataVolume, getFirstDataTime, getFirstIndexTime, getItem, getLastDataTime, getLastIndexTime, getPolicy, hollowItem, removeItem, setPolicy, size
 

Constructor Detail

FileIndexCache

public FileIndexCache(StoredIndex index)
Create a FileIndexCache object.

Method Detail

getItem

public IndexItem getItem(long pos)
Get an Index Item from the Index.

Specified by:
getItem in interface IndexCache
Overrides:
getItem in class DefaultIndexCache

hollowItem

public boolean hollowItem(long pos)
Hollow the IndexItem at the position. This sets the data to be a data reference.

Specified by:
hollowItem in interface IndexCache
Overrides:
hollowItem in class DefaultIndexCache

removeItem

public boolean removeItem(long pos)
Remove the IndexItem at the speicifed position.

Specified by:
removeItem in interface IndexCache
Overrides:
removeItem in class DefaultIndexCache

clear

public boolean clear()
Clear the whole cache

Specified by:
clear in interface IndexCache
Overrides:
clear in class DefaultIndexCache