|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.index.FSTransLog
public class FSTransLog
A transaction log that saves most of the transactional data log into disk.
Can be provided with a transaction log path (using
LuceneEnvironment.Transaction.TransLog.PATH setting), where
different directories will be created in (in the form of PATH/compass/translog/[tran id]). All
the trans data is stored into a single file called transdata.
Two parameters can be set on this transaction log as well, the first is read buffer size, which controls the size of the buffer for read operations. This can affect the memory consumption of this transaction log, and defaults to 64 (bytes). The write buffer is the memory buffer used to write data into the file system, and defaults to 2048 (bytes). It is pooled so does not affect memory consumption that much.
| Nested Class Summary | |
|---|---|
(package private) class |
FSTransLog.TransDirectory
Transactional log directory implementation, writes all the data into memory until FSTransLog.TransDirectory.flush() is called (it is called in the onDocumentAdded() callback). |
| Constructor Summary | |
|---|---|
FSTransLog()
|
|
| 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 |
|---|
public FSTransLog()
| Method Detail |
|---|
public void configure(CompassSettings settings)
throws CompassException
CompassConfigurable
configure in interface CompassConfigurablesettings - The settings for the configured object
CompassExceptionpublic Directory getDirectory()
TransLog
getDirectory in interface TransLogpublic boolean shouldUpdateTransSegments()
TransLog
shouldUpdateTransSegments in interface TransLog
public void close()
throws IOException
TransLog
close in interface TransLogIOException
public void onDocumentAdded()
throws IOException
TransLog
onDocumentAdded in interface TransLogIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||