Luigi Homepage

net.cw.luigi.index
Interface IndexConfiguration

All Known Implementing Classes:
IndexConfigurationImpl

public interface IndexConfiguration

This is the configuration for an index. Implementations of this class must provide three responsibilities:

  1. managing a Lucene Directory: each configuration corresponds to one phisical address
  2. identifying the Analyzer used by the Index and the Searcher
  3. allowing clients to listen for a change event when the storage device changes, through use of ChangeEvents

Version:
$Revision: 1.2 $
Author:
Tiago Silveira

Method Summary
 void addChangeEventListener(ChangeEventListener listener)
          Adds a ChangeEventListener to the IndexConfiguration object
 void fireIndexChanged()
          fires a change event that will be catched by the current listeners.
 Analyzer getAnalyzer()
          Gets the analyzer attribute of the IndexConfiguration object
 Directory getDirectory(boolean deleteContents)
          gets the existing Directory instance.
 String getIndexName()
          Gets the indexName attribute of the IndexConfiguration object.
 void removeChangeEventListener(ChangeEventListener listener)
          TODO: Description of the Method
 

Method Detail

getIndexName

String getIndexName()
Gets the indexName attribute of the IndexConfiguration object. This is only for identification (as a key in a map), logging and debugging purposes.

Returns:
The index name value

getDirectory

Directory getDirectory(boolean deleteContents)
                       throws IOException
gets the existing Directory instance. See the documentation of Lucene about instantiating directories

Parameters:
deleteContents - if true, will delete any contents of the directory
Returns:
The directory instance
Throws:
IOException - if Lucene throws IOException

getAnalyzer

Analyzer getAnalyzer()
Gets the analyzer attribute of the IndexConfiguration object

Returns:
The analyzer value

addChangeEventListener

void addChangeEventListener(ChangeEventListener listener)
Adds a ChangeEventListener to the IndexConfiguration object

Parameters:
listener - The ChangeEventListener to be added

removeChangeEventListener

void removeChangeEventListener(ChangeEventListener listener)
TODO: Description of the Method

Parameters:
listener - TODO: Description of the Parameter

fireIndexChanged

void fireIndexChanged()
fires a change event that will be catched by the current listeners. Details about the contents of the event can be negotiated by the implementations


Luigi Homepage