org.teiid.internal.core.index
Class SimpleIndexBlock

java.lang.Object
  extended by org.teiid.internal.core.index.Block
      extended by org.teiid.internal.core.index.IndexBlock
          extended by org.teiid.internal.core.index.SimpleIndexBlock

public class SimpleIndexBlock
extends IndexBlock

Does no compression of words, and uses 4-byte ints for file numbers and number of files.


Field Summary
protected  int offset
           
 
Fields inherited from class org.teiid.internal.core.index.Block
blockSize, field
 
Constructor Summary
SimpleIndexBlock(int blockSize)
           
 
Method Summary
 boolean addEntry(WordEntry entry)
          Adds the given wordEntry to the indexBlock.
 WordEntry findEntry(char[] word)
           
 void flush()
          Flushes the block
 boolean isEmpty()
          Returns whether the block is empty or not (if it doesn't contain any wordEntry).
 boolean nextEntry(WordEntry entry)
          Finds the next wordEntry and stores it in the given entry.
 void reset()
           
 
Methods inherited from class org.teiid.internal.core.index.IndexBlock
clear, findEntryPrefixedBy, findExactEntry
 
Methods inherited from class org.teiid.internal.core.index.Block
read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offset

protected int offset
Constructor Detail

SimpleIndexBlock

public SimpleIndexBlock(int blockSize)
Method Detail

addEntry

public boolean addEntry(WordEntry entry)
Description copied from class: IndexBlock
Adds the given wordEntry to the indexBlock.

Specified by:
addEntry in class IndexBlock
See Also:
IndexBlock.addEntry(org.teiid.internal.core.index.WordEntry)

findEntry

public WordEntry findEntry(char[] word)

flush

public void flush()
Description copied from class: Block
Flushes the block

Overrides:
flush in class Block
See Also:
Block.flush()

isEmpty

public boolean isEmpty()
Description copied from class: IndexBlock
Returns whether the block is empty or not (if it doesn't contain any wordEntry).

Specified by:
isEmpty in class IndexBlock
See Also:
IndexBlock.isEmpty()

nextEntry

public boolean nextEntry(WordEntry entry)
Description copied from class: IndexBlock
Finds the next wordEntry and stores it in the given entry.

Specified by:
nextEntry in class IndexBlock
See Also:
IndexBlock.nextEntry(org.teiid.internal.core.index.WordEntry)

reset

public void reset()
Overrides:
reset in class IndexBlock
See Also:
IndexBlock.reset()


Copyright © 2011. All Rights Reserved.