Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Lucene::MultiLevelSkipListReader Class Referenceabstract

This abstract class reads skip lists with multiple levels. More...

#include <MultiLevelSkipListReader.h>

+ Inheritance diagram for Lucene::MultiLevelSkipListReader:

Public Member Functions

 MultiLevelSkipListReader (const IndexInputPtr &skipStream, int32_t maxSkipLevels, int32_t skipInterval)
 
virtual ~MultiLevelSkipListReader ()
 
virtual String getClassName ()
 
boost::shared_ptr< MultiLevelSkipListReadershared_from_this ()
 
virtual int32_t getDoc ()
 Returns the id of the doc to which the last call of skipTo(int) has skipped.
 
virtual int32_t skipTo (int32_t target)
 Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count.
 
virtual void close ()
 
virtual void init (int64_t skipPointer, int32_t df)
 Initializes the reader.
 
- Public Member Functions inherited from Lucene::LuceneObject
virtual ~LuceneObject ()
 
virtual void initialize ()
 Called directly after instantiation to create objects that depend on this object being fully constructed.
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
 
virtual int32_t hashCode ()
 Return hash code for this object.
 
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal.
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
 
virtual String toString ()
 Returns a string representation of the object.
 
- Public Member Functions inherited from Lucene::LuceneSync
virtual ~LuceneSync ()
 
virtual SynchronizePtr getSync ()
 Return this object synchronize lock.
 
virtual LuceneSignalPtr getSignal ()
 Return this object signal.
 
virtual void lock (int32_t timeout=0)
 Lock this object using an optional timeout.
 
virtual void unlock ()
 Unlock this object.
 
virtual bool holdsLock ()
 Returns true if this object is currently locked by current thread.
 
virtual void wait (int32_t timeout=0)
 Wait for signal using an optional timeout.
 
virtual void notifyAll ()
 Notify all threads waiting for signal.
 

Static Public Member Functions

static String _getClassName ()
 

Protected Member Functions

virtual bool loadNextSkip (int32_t level)
 
virtual void seekChild (int32_t level)
 Seeks the skip entry on the given level.
 
virtual void loadSkipLevels ()
 Loads the skip levels.
 
virtual int32_t readSkipData (int32_t level, const IndexInputPtr &skipStream)=0
 Subclasses must implement the actual skip data encoding in this method.
 
virtual void setLastSkipData (int32_t level)
 Copies the values of the last read skip entry on this level.
 
- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 

Protected Attributes

int32_t maxNumberOfSkipLevels
 the maximum number of skip levels possible for this index
 
int32_t numberOfSkipLevels
 number of levels in this skip list
 
int32_t numberOfLevelsToBuffer
 Defines the number of top skip levels to buffer in memory. Reducing this number results in less memory usage, but possibly slower performance due to more random I/Os. Please notice that the space each level occupies is limited by the skipInterval. The top level can not contain more than skipLevel entries, the second top level can not contain more than skipLevel^2 entries and so forth.
 
int32_t docCount
 
bool haveSkipped
 
Collection< IndexInputPtrskipStream
 
Collection< int64_t > skipPointer
 
Collection< int32_t > skipInterval
 
Collection< int32_t > numSkipped
 
Collection< int32_t > skipDoc
 
int32_t lastDoc
 
Collection< int64_t > childPointer
 
int64_t lastChildPointer
 
bool inputIsBuffered
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Detailed Description

This abstract class reads skip lists with multiple levels.

See MultiLevelSkipListWriter for the information about the encoding of the multi level skip lists.

Subclasses must implement the abstract method readSkipData(int, IndexInput) which defines the actual format of the skip data.

Constructor & Destructor Documentation

◆ MultiLevelSkipListReader()

Lucene::MultiLevelSkipListReader::MultiLevelSkipListReader ( const IndexInputPtr skipStream,
int32_t  maxSkipLevels,
int32_t  skipInterval 
)

◆ ~MultiLevelSkipListReader()

virtual Lucene::MultiLevelSkipListReader::~MultiLevelSkipListReader ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::MultiLevelSkipListReader::_getClassName ( )
inlinestatic

◆ close()

virtual void Lucene::MultiLevelSkipListReader::close ( )
virtual

◆ getClassName()

virtual String Lucene::MultiLevelSkipListReader::getClassName ( )
inlinevirtual

Reimplemented in Lucene::DefaultSkipListReader.

◆ getDoc()

virtual int32_t Lucene::MultiLevelSkipListReader::getDoc ( )
virtual

Returns the id of the doc to which the last call of skipTo(int) has skipped.

◆ init()

virtual void Lucene::MultiLevelSkipListReader::init ( int64_t  skipPointer,
int32_t  df 
)
virtual

Initializes the reader.

◆ loadNextSkip()

virtual bool Lucene::MultiLevelSkipListReader::loadNextSkip ( int32_t  level)
protectedvirtual

◆ loadSkipLevels()

virtual void Lucene::MultiLevelSkipListReader::loadSkipLevels ( )
protectedvirtual

Loads the skip levels.

◆ readSkipData()

virtual int32_t Lucene::MultiLevelSkipListReader::readSkipData ( int32_t  level,
const IndexInputPtr skipStream 
)
protectedpure virtual

Subclasses must implement the actual skip data encoding in this method.

Parameters
levelthe level skip data shall be read from
skipStreamthe skip stream to read from

Implemented in Lucene::DefaultSkipListReader.

◆ seekChild()

virtual void Lucene::MultiLevelSkipListReader::seekChild ( int32_t  level)
protectedvirtual

Seeks the skip entry on the given level.

Reimplemented in Lucene::DefaultSkipListReader.

◆ setLastSkipData()

virtual void Lucene::MultiLevelSkipListReader::setLastSkipData ( int32_t  level)
protectedvirtual

Copies the values of the last read skip entry on this level.

Reimplemented in Lucene::DefaultSkipListReader.

◆ shared_from_this()

boost::shared_ptr< MultiLevelSkipListReader > Lucene::MultiLevelSkipListReader::shared_from_this ( )
inline

◆ skipTo()

virtual int32_t Lucene::MultiLevelSkipListReader::skipTo ( int32_t  target)
virtual

Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count.

Field Documentation

◆ childPointer

Collection<int64_t> Lucene::MultiLevelSkipListReader::childPointer
protected

◆ docCount

int32_t Lucene::MultiLevelSkipListReader::docCount
protected

◆ haveSkipped

bool Lucene::MultiLevelSkipListReader::haveSkipped
protected

◆ inputIsBuffered

bool Lucene::MultiLevelSkipListReader::inputIsBuffered
protected

◆ lastChildPointer

int64_t Lucene::MultiLevelSkipListReader::lastChildPointer
protected

◆ lastDoc

int32_t Lucene::MultiLevelSkipListReader::lastDoc
protected

◆ maxNumberOfSkipLevels

int32_t Lucene::MultiLevelSkipListReader::maxNumberOfSkipLevels
protected

the maximum number of skip levels possible for this index

◆ numberOfLevelsToBuffer

int32_t Lucene::MultiLevelSkipListReader::numberOfLevelsToBuffer
protected

Defines the number of top skip levels to buffer in memory. Reducing this number results in less memory usage, but possibly slower performance due to more random I/Os. Please notice that the space each level occupies is limited by the skipInterval. The top level can not contain more than skipLevel entries, the second top level can not contain more than skipLevel^2 entries and so forth.

◆ numberOfSkipLevels

int32_t Lucene::MultiLevelSkipListReader::numberOfSkipLevels
protected

number of levels in this skip list

◆ numSkipped

Collection<int32_t> Lucene::MultiLevelSkipListReader::numSkipped
protected

◆ skipDoc

Collection<int32_t> Lucene::MultiLevelSkipListReader::skipDoc
protected

◆ skipInterval

Collection<int32_t> Lucene::MultiLevelSkipListReader::skipInterval
protected

◆ skipPointer

Collection<int64_t> Lucene::MultiLevelSkipListReader::skipPointer
protected

◆ skipStream

Collection<IndexInputPtr> Lucene::MultiLevelSkipListReader::skipStream
protected

The documentation for this class was generated from the following file:

clucene.sourceforge.net