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, COMMENTS_SUBDIR, ISSUES_SUBDIR
 
Constructor Summary
MemoryIndexManager()
           
 
Method Summary
 Directory getCommentDirectory()
          Gets directory where comment indexes are stored
 java.lang.String getCommentPath()
          The specific path of the comments index
protected  java.lang.String getFilePath()
          Return the path beneath which the different index directories are stored
protected  IndexReader getIndexReader(java.lang.String path)
          Used to retrieve an index reader where given a path
protected  IndexWriter getIndexWriter(java.lang.String path, boolean create)
          Get an indexWriter given a path
 Directory getIssueDirectory()
          Gets the directory where issue indexes are stored
 java.lang.String getIssuePath()
          The specific path of the issue index
 
Methods inherited from class com.atlassian.jira.issue.index.DefaultIndexManager
deIndex, isBusy, reIndex, reIndexAll, 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 java.lang.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 java.lang.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 java.lang.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 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
Returns:

getCommentDirectory

public Directory getCommentDirectory()
Gets directory where comment indexes are stored

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

getIndexReader

protected IndexReader getIndexReader(java.lang.String path)
                              throws IndexException
Used to retrieve an index reader where given a path

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

getIndexWriter

protected IndexWriter getIndexWriter(java.lang.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 -
Returns:
Throws:
IndexException