com.atlassian.jira.util
Class LuceneDirectoryUtilsImpl
java.lang.Object
com.atlassian.jira.util.LuceneDirectoryUtilsImpl
- All Implemented Interfaces:
- LuceneDirectoryUtils
public class LuceneDirectoryUtilsImpl
- extends Object
- implements LuceneDirectoryUtils
- Since:
- v5.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuceneDirectoryUtilsImpl
public LuceneDirectoryUtilsImpl()
getDirectory
public org.apache.lucene.store.Directory getDirectory(File path)
- Description copied from interface:
LuceneDirectoryUtils
- Creates an index directory for the given path on the filesystem.
- Specified by:
getDirectory
in interface LuceneDirectoryUtils
- Parameters:
path
- to the index directory.
- Returns:
- an implementation of
Directory
createDirRobust
public void createDirRobust(String path)
throws IOException
- Description copied from interface:
LuceneDirectoryUtils
- Creates a directory (robustly) or throws appropriate Exception
- Specified by:
createDirRobust
in interface LuceneDirectoryUtils
- Parameters:
path
- Lucene index directory path
- Throws:
IOException
- if cannot create directory, write to the directory, or not a directory
getStaleLockPaths
public Collection<String> getStaleLockPaths(Collection<String> indexDirectoryPaths)
- Description copied from interface:
LuceneDirectoryUtils
- Given a
Collection
of paths that represent index directories checks if there are any existing
Lucene lock files for the passed paths. This method returns a Collection
of file paths of any existing
Lucene lock files. If no lock files are found an empty collection is returned.
A common usage of this methdo would be:
Collection existingLockFilepaths = LuceneUtils.getStaleLockPaths(indexManager.getAllIndexPaths());
- Specified by:
getStaleLockPaths
in interface LuceneDirectoryUtils
- Parameters:
indexDirectoryPaths
- collection of index directory paths
- Returns:
- collection of file paths of any existing Lucene lock files
getLocks
public Collection<String> getLocks(String path)
throws IOException
- Throws:
IOException
Copyright © 2002-2012 Atlassian. All Rights Reserved.