org.egothor.dir
Class BufferedTanker

java.lang.Object
  extended by org.egothor.dir.BufferedTanker

public class BufferedTanker
extends java.lang.Object

The BufferedTanker object uses a small memory barrel as a cache. This object should be used when creating a new index, because it significantly improves speed of indexing.

Author:
Leo Galambos

Constructor Summary
BufferedTanker(int cacheSize, Tanker orig)
          Constructor for the BufferedTanker object.
BufferedTanker(Tanker orig)
           
 
Method Summary
 void append(BarrelReader a)
          Add the contents of the given Barrel to the cache.
 void close()
           
 void commit()
          Store the actual state of this Tanker.
 void optimize()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedTanker

public BufferedTanker(int cacheSize,
                      Tanker orig)
Constructor for the BufferedTanker object. Calling this constructor merely creates an instance of the superclass.

Parameters:
dis - the Distributor
dyn - the Dynamizer

BufferedTanker

public BufferedTanker(Tanker orig)
Method Detail

commit

public void commit()
Store the actual state of this Tanker. In addition to the global properties of this Tanker, the ID of each Barrel in this Tanker is written to this Tanker's configuration file. If the location of the Tanker is null it does nothing.


optimize

public void optimize()
Description of the Method


append

public void append(BarrelReader a)
Add the contents of the given Barrel to the cache.

Parameters:
a - the Barrel to add to the cache

close

public void close()