com.timeindexing.cache
Interface CachePolicy

All Known Implementing Classes:
AbstractCachePolicy, HollowAfterTimeoutPolicy, HollowAfterUsePolicy, HollowAtDataVolumePolicy, HollowAtDataVolumeRemoveAfterTimeoutPolicy, RemoveAfterTimeoutPolicy, RemoveAfterUsePolicy, RemoveAtDataVolumePolicy

public interface CachePolicy

A policy for maintaining the cache.


Method Summary
 IndexCache getIndexCache()
          Get the IndexCache that this is a policy for.
 java.lang.Object notifyAddItemBegin(IndexItem item, long pos)
          Called at the beginning of cache.addItem()
 java.lang.Object notifyAddItemEnd(IndexItem item, long pos)
          Called at the beginning of cache.addItem()
 java.lang.Object notifyGetItemBegin(IndexItem item, long pos)
          Called at the beginning of cache.getItem()
 java.lang.Object notifyGetItemEnd(IndexItem item, long pos)
          Called at the end of cache.getItem()
 CachePolicy setIndexCache(IndexCache cache)
          Set the IndexCache that this is a policy for.
 

Method Detail

setIndexCache

public CachePolicy setIndexCache(IndexCache cache)
Set the IndexCache that this is a policy for.


getIndexCache

public IndexCache getIndexCache()
Get the IndexCache that this is a policy for.


notifyAddItemBegin

public java.lang.Object notifyAddItemBegin(IndexItem item,
                                           long pos)
Called at the beginning of cache.addItem()

Parameters:
item - the item being added
pos - the position the item is being added to

notifyAddItemEnd

public java.lang.Object notifyAddItemEnd(IndexItem item,
                                         long pos)
Called at the beginning of cache.addItem()

Parameters:
item - the item being added
pos - the position the item is being added to

notifyGetItemBegin

public java.lang.Object notifyGetItemBegin(IndexItem item,
                                           long pos)
Called at the beginning of cache.getItem()

Parameters:
pos - the position being requested

notifyGetItemEnd

public java.lang.Object notifyGetItemEnd(IndexItem item,
                                         long pos)
Called at the end of cache.getItem()

Parameters:
item - the item being returned