org.egothor.core
Interface BarrelWriter

All Known Implementing Classes:
Dumper, Extractor, MemoryBarrel, StreamWriter, Tanker, TankerImpl, TankerImplDuplicityChecker, TankerImplSecure, ThickBarrelOut, ThickBarrelSortedOut, ThickFastOut

public interface BarrelWriter

The BarrelWriter interface should be implemented by any class that can write or create a Barrel. That Barrel would be readable somehow and its run-time (Barrel) and read (BarrelReader) alternatives would exist.

Author:
Leo Galambos

Method Summary
 void append(BarrelReader old)
          Append the given Barrel to this BarrelWriter's Barrel.
 void close()
          Finish all operations so that the Barrel produced is consistent.
 

Method Detail

append

void append(BarrelReader old)
            throws java.io.IOException
Append the given Barrel to this BarrelWriter's Barrel. The incoming Barrel (represented by its BarrelReader) is optimized during the append operation. Documents get new unique IDs, and inverted lists are stored without removed documents.

Parameters:
old - the Barrel to append
Throws:
java.io.IOException - if an I/O error occurs

close

void close()
Finish all operations so that the Barrel produced is consistent. It also closes all open files.