org.apache.lucene.index
Class RAMTransLog

java.lang.Object
  extended by org.apache.lucene.index.RAMTransLog
All Implemented Interfaces:
TransLog, CompassConfigurable

public class RAMTransLog
extends Object
implements TransLog

A memory based transaction log. Fast, but long running transaciton or large transactions might not fit into memory.

Author:
kimchy

Constructor Summary
RAMTransLog()
           
 
Method Summary
 void close()
          Closes the transaction log.
 void configure(CompassSettings settings)
          Configure using the given settings.
 Directory getDirectory()
          Returns the Lucene directory the transaction log will be written to
 void onDocumentAdded()
          A callback notifiying the trasaction log that a document was added (can be used for flushing for example).
 boolean shouldUpdateTransSegments()
          Returns true if the transaction segments should be written for each change made to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMTransLog

public RAMTransLog()
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

shouldUpdateTransSegments

public boolean shouldUpdateTransSegments()
Description copied from interface: TransLog
Returns true if the transaction segments should be written for each change made to it.

Specified by:
shouldUpdateTransSegments in interface TransLog

getDirectory

public Directory getDirectory()
Description copied from interface: TransLog
Returns the Lucene directory the transaction log will be written to

Specified by:
getDirectory in interface TransLog

onDocumentAdded

public void onDocumentAdded()
Description copied from interface: TransLog
A callback notifiying the trasaction log that a document was added (can be used for flushing for example).

Specified by:
onDocumentAdded in interface TransLog

close

public void close()
Description copied from interface: TransLog
Closes the transaction log.

Specified by:
close in interface TransLog


Copyright (c) 2004-2006 The Compass Project.