public static interface

Index.Manager

implements Closeable
com.atlassian.jira.index.Index.Manager

Class Overview

Management of an Index

Summary

[Expand]
Inherited Fields
From interface com.atlassian.jira.util.Closeable
Public Methods
void deleteIndexDirectory()
Clean out the underlying directory the index is contained in.
@Nonnull Index getIndex()
Get the current IndexConnection this manager holds.
@Nonnull IndexSearcher getSearcher()
Get the current IndexSearcher from the Index.
boolean isIndexCreated()
Returns true if the index has been created.
[Expand]
Inherited Methods
From interface com.atlassian.jira.util.Closeable
From interface java.io.Closeable

Public Methods

public void deleteIndexDirectory ()

Clean out the underlying directory the index is contained in.

Blow away any indexes that currently live there.

@Nonnull public Index getIndex ()

Get the current IndexConnection this manager holds. May throw exceptions if the index has not been created.

Returns
  • the Index this manager refers to
Throws
IllegalStateException if the index directory is not created etc.

@Nonnull public IndexSearcher getSearcher ()

Get the current IndexSearcher from the Index.

You must call the close method in a finally block once the searcher is no longer needed.

Returns

public boolean isIndexCreated ()

Returns true if the index has been created. This means that the index directory itself exists AND has been initialised with the default required index files.

Returns
  • true if the index exists, false otherwise.