org.teiid.internal.core.index
Class GammaCompressedIndexBlock

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.GammaCompressedIndexBlock

public class GammaCompressedIndexBlock
extends IndexBlock

Uses prefix coding on words, and gamma coding of document numbers differences.


Field Summary
 
Fields inherited from class org.teiid.internal.core.index.Block
blockSize, field
 
Constructor Summary
GammaCompressedIndexBlock(int blockSize)
           
 
Method Summary
 boolean addEntry(WordEntry entry)
          Adds the given wordEntry to the indexBlock.
protected  void encodeEntry(WordEntry entry, char[] prevWord, CodeByteStream codeStream)
           
 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
 

Constructor Detail

GammaCompressedIndexBlock

public GammaCompressedIndexBlock(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)

encodeEntry

protected void encodeEntry(WordEntry entry,
                           char[] prevWord,
                           CodeByteStream codeStream)

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.