com.atlassian.jira.issue.index
Class MemoryIndexManager

java.lang.Object
  extended bycom.atlassian.jira.issue.index.DefaultIndexManager
      extended bycom.atlassian.jira.issue.index.MemoryIndexManager
All Implemented Interfaces:
IssueIndexManager

public class MemoryIndexManager
extends DefaultIndexManager

A based index manager to allow indexing to be done in memory rather than on the FS.

It can be used in test cases which involves the validity of data being indexed/deindexed/reindexed


Field Summary
 
Fields inherited from class com.atlassian.jira.issue.index.DefaultIndexManager
ANALYZER_FOR_INDEXING, ANALYZER_FOR_SEARCHING, COMMENTS_SUBDIR, ISSUES_SUBDIR, PLUGINS_SUBDIR
 
Constructor Summary
MemoryIndexManager()
           
 
Method Summary
 org.apache.lucene.store.Directory getCommentDirectory()
          Gets directory where comment indexes are stored
 String getCommentPath()
          The specific path of the comments index
protected  String getFilePath()
          Return the path beneath which the different index directories are stored
protected  org.apache.lucene.index.IndexReader getIndexReader(String path)
          Used to retrieve an index reader where given a path
protected  org.apache.lucene.index.IndexWriter getIndexWriter(String path, boolean create)
          Get an indexWriter given a path
 org.apache.lucene.store.Directory getIssueDirectory()
          Gets the directory where issue indexes are stored
 String getIssuePath()
          The specific path of the issue index
protected  void removeDirectory()
           
 
Methods inherited from class com.atlassian.jira.issue.index.DefaultIndexManager
activate, deactivate, deactivate, deIndex, getAllIndexPaths, getExistingPluginsPaths, getPluginsRootPath, isBusy, reIndex, reIndex, reIndexAll, reIndexAll, reIndexIssueObjects, reIndexIssues, reIndexIssues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryIndexManager

public MemoryIndexManager()
Method Detail

getIssuePath

public String getIssuePath()
Description copied from class: DefaultIndexManager
The specific path of the issue index

Specified by:
getIssuePath in interface IssueIndexManager
Overrides:
getIssuePath in class DefaultIndexManager

getCommentPath

public String getCommentPath()
Description copied from class: DefaultIndexManager
The specific path of the comments index

Specified by:
getCommentPath in interface IssueIndexManager
Overrides:
getCommentPath in class DefaultIndexManager

getFilePath

protected String getFilePath()
Description copied from class: DefaultIndexManager
Return the path beneath which the different index directories are stored

Overrides:
getFilePath in class DefaultIndexManager

getIssueDirectory

public org.apache.lucene.store.Directory getIssueDirectory()
Gets the directory where issue indexes are stored

In this case, it will be the existing instance of the RAMDirectory

Specified by:
getIssueDirectory in interface IssueIndexManager
Overrides:
getIssueDirectory in class DefaultIndexManager

getCommentDirectory

public org.apache.lucene.store.Directory getCommentDirectory()
Gets directory where comment indexes are stored

Specified by:
getCommentDirectory in interface IssueIndexManager
Overrides:
getCommentDirectory in class DefaultIndexManager

getIndexReader

protected org.apache.lucene.index.IndexReader getIndexReader(String path)
                                                      throws IndexException
Used to retrieve an index reader where given a path

Overrides:
getIndexReader in class DefaultIndexManager
Parameters:
path -
Throws:
IndexException

getIndexWriter

protected org.apache.lucene.index.IndexWriter getIndexWriter(String path,
                                                             boolean create)
                                                      throws IndexException
Get an indexWriter given a path

Only uses the path as a flag here to decide which RAMDirectory to use

Overrides:
getIndexWriter in class DefaultIndexManager
Parameters:
path -
create -
Throws:
IndexException

removeDirectory

protected void removeDirectory()


Copyright © 2002-2006 Atlassian. All Rights Reserved.