com.atlassian.jira.issue.index
Class DefaultIndexManager

java.lang.Object
  extended bycom.atlassian.jira.issue.index.DefaultIndexManager
All Implemented Interfaces:
IssueIndexManager
Direct Known Subclasses:
BulkOnlyIndexManager, MemoryIndexManager

public class DefaultIndexManager
extends java.lang.Object
implements IssueIndexManager


Field Summary
static Analyzer ANALYZER
           
static java.lang.String COMMENTS_SUBDIR
           
static java.lang.String ISSUES_SUBDIR
           
 
Constructor Summary
DefaultIndexManager()
           
 
Method Summary
 void deIndex(GenericValue entity)
           
 Directory getCommentDirectory()
           
 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)
          Obtain an IndexReader
protected  IndexWriter getIndexWriter(java.lang.String path, boolean create)
          Obtain an IndexWriter for and optionally create.
 Directory getIssueDirectory()
           
 java.lang.String getIssuePath()
          The specific path of the issue index
 boolean isBusy()
           
 void reIndex(GenericValue entity)
           
 long reIndexAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANALYZER

public static final Analyzer ANALYZER

COMMENTS_SUBDIR

public static final java.lang.String COMMENTS_SUBDIR
See Also:
Constant Field Values

ISSUES_SUBDIR

public static final java.lang.String ISSUES_SUBDIR
See Also:
Constant Field Values
Constructor Detail

DefaultIndexManager

public DefaultIndexManager()
Method Detail

isBusy

public boolean isBusy()
Specified by:
isBusy in interface IssueIndexManager

reIndexAll

public long reIndexAll()
                throws IndexException
Specified by:
reIndexAll in interface IssueIndexManager
Returns:
The number of milliseconds taken to reindex everything, or -1 if not indexing
Throws:
IndexException

reIndex

public void reIndex(GenericValue entity)
             throws IndexException
Specified by:
reIndex in interface IssueIndexManager
Throws:
IndexException

deIndex

public void deIndex(GenericValue entity)
             throws IndexException
Specified by:
deIndex in interface IssueIndexManager
Throws:
IndexException

getIssuePath

public java.lang.String getIssuePath()
The specific path of the issue index

Specified by:
getIssuePath in interface IssueIndexManager

getCommentPath

public java.lang.String getCommentPath()
The specific path of the comments index

Specified by:
getCommentPath in interface IssueIndexManager

getIssueDirectory

public Directory getIssueDirectory()
Specified by:
getIssueDirectory in interface IssueIndexManager

getCommentDirectory

public Directory getCommentDirectory()
Specified by:
getCommentDirectory in interface IssueIndexManager

getFilePath

protected java.lang.String getFilePath()
Return the path beneath which the different index directories are stored


getIndexReader

protected IndexReader getIndexReader(java.lang.String path)
                              throws IndexException
Obtain an IndexReader

Throws:
IndexException

getIndexWriter

protected IndexWriter getIndexWriter(java.lang.String path,
                                     boolean create)
                              throws IndexException
Obtain an IndexWriter for and optionally create.

Throws:
IndexException