com.timeindexing.cache
Class RemoveAfterUsePolicy

java.lang.Object
  extended bycom.timeindexing.cache.AbstractCachePolicy
      extended bycom.timeindexing.cache.RemoveAfterUsePolicy
All Implemented Interfaces:
CachePolicy

public class RemoveAfterUsePolicy
extends AbstractCachePolicy
implements CachePolicy

Remove items after they have been used.


Constructor Summary
RemoveAfterUsePolicy()
          Construct this policy object
RemoveAfterUsePolicy(int winSize)
          Construct this policy object
 
Method Summary
 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()
 java.lang.String toString()
          TO String
 
Methods inherited from class com.timeindexing.cache.AbstractCachePolicy
getIndexCache, isInFirst, notifyAddItemBegin, notifyAddItemEnd, setIndexCache, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.timeindexing.cache.CachePolicy
getIndexCache, notifyAddItemBegin, notifyAddItemEnd, setIndexCache
 

Constructor Detail

RemoveAfterUsePolicy

public RemoveAfterUsePolicy()
Construct this policy object


RemoveAfterUsePolicy

public RemoveAfterUsePolicy(int winSize)
Construct this policy object

Method Detail

notifyGetItemBegin

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

Specified by:
notifyGetItemBegin in interface CachePolicy
Overrides:
notifyGetItemBegin in class AbstractCachePolicy
Parameters:
pos - the position being requested

notifyGetItemEnd

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

Specified by:
notifyGetItemEnd in interface CachePolicy
Overrides:
notifyGetItemEnd in class AbstractCachePolicy
Parameters:
item - the item being returned

toString

public java.lang.String toString()
TO String