|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.internal.core.index.IndexOutput
org.teiid.internal.core.index.BlocksIndexOutput
public class BlocksIndexOutput
A blocksIndexOutput is used to save an index in a file with the given structure:
- Signature of the file;
- FileListBlocks;
- IndexBlocks;
- Summary of the index.
| Field Summary | |
|---|---|
protected int |
blockNum
|
protected FileListBlock |
fileListBlock
|
protected boolean |
firstFileListBlock
|
protected boolean |
firstInBlock
|
protected boolean |
firstIndexBlock
|
protected IndexBlock |
indexBlock
|
protected org.jboss.virtual.VirtualFile |
indexFile
|
protected java.io.RandomAccessFile |
indexOut
|
protected int |
numFiles
|
protected int |
numWords
|
protected boolean |
opened
|
protected IndexSummary |
summary
|
| Constructor Summary | |
|---|---|
BlocksIndexOutput(org.jboss.virtual.VirtualFile indexFile)
|
|
| Method Summary | |
|---|---|
void |
addFile(IndexedFile indexedFile)
Adds a File to the destination. |
void |
addWord(WordEntry entry)
Adds a word to the destination. |
void |
close()
Closes the output, releasing the resources it was using. |
void |
flush()
Flushes the output. |
protected void |
flushFiles()
Writes the current fileListBlock on the disk and initialises it (when it's full or it's the end of the index). |
protected void |
flushWords()
Writes the current indexBlock on the disk and initialises it (when it's full or it's the end of the index). |
java.lang.Object |
getDestination()
Returns the Object the output is writing to. |
void |
open()
Opens the output, before writing any information. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.RandomAccessFile indexOut
protected int blockNum
protected boolean opened
protected org.jboss.virtual.VirtualFile indexFile
protected FileListBlock fileListBlock
protected IndexBlock indexBlock
protected int numWords
protected IndexSummary summary
protected int numFiles
protected boolean firstInBlock
protected boolean firstIndexBlock
protected boolean firstFileListBlock
| Constructor Detail |
|---|
public BlocksIndexOutput(org.jboss.virtual.VirtualFile indexFile)
| Method Detail |
|---|
public void addFile(IndexedFile indexedFile)
throws java.io.IOException
IndexOutput
addFile in class IndexOutputjava.io.IOExceptionIndexOutput.addFile(org.teiid.internal.core.index.IndexedFile)
public void addWord(WordEntry entry)
throws java.io.IOException
IndexOutput
addWord in class IndexOutputjava.io.IOExceptionIndexOutput.addWord(org.teiid.internal.core.index.WordEntry)
public void close()
throws java.io.IOException
IndexOutput
close in class IndexOutputjava.io.IOExceptionIndexOutput.close()
public void flush()
throws java.io.IOException
IndexOutput
flush in class IndexOutputjava.io.IOExceptionIndexOutput.flush()
protected void flushFiles()
throws java.io.IOException
java.io.IOException
protected void flushWords()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object getDestination()
IndexOutput
getDestination in class IndexOutputIndexOutput.getDestination()
public void open()
throws java.io.IOException
IndexOutput
open in class IndexOutputjava.io.IOExceptionIndexOutput.open()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||