public class DirectoryHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static File |
getVerifiedIndexDir(String annotatedIndexName,
Properties properties,
boolean verifyIsWritable)
Verify the index directory exists and is writable,
or creates it if not existing.
|
static void |
initializeIndexIfNeeded(org.apache.lucene.store.Directory directory)
Initialize the Lucene Directory if it isn't already.
|
public static void initializeIndexIfNeeded(org.apache.lucene.store.Directory directory)
directory - the Directory to initializeSearchException - in case of lock acquisition timeouts, IOException, or if a corrupt index is foundpublic static File getVerifiedIndexDir(String annotatedIndexName, Properties properties, boolean verifyIsWritable)
annotatedIndexName - The index name declared on the @Indexed annotationproperties - The properties may override the indexname.verifyIsWritable - Verify the directory is writableSearchException - if any.Copyright © 2006–2015 Hibernate. All rights reserved.