|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.search.store.impl.DirectoryProviderHelper
public final class DirectoryProviderHelper
| Method Summary | |
|---|---|
static org.apache.lucene.store.FSDirectory |
createFSIndex(File indexDir,
Properties properties)
Creates an FSDirectory in provided directory and initializes an index if not already existing. |
static org.apache.lucene.store.LockFactory |
createLockFactory(File indexDir,
Properties dirConfiguration)
Creates a LockFactory as selected in the configuration for the DirectoryProvider. |
static long |
getCopyBufferSize(String indexName,
Properties properties)
Users may configure the number of MB to use as "chunk size" for large file copy operations performed by DirectoryProviders. |
static File |
getSourceDirectory(String indexName,
Properties properties,
boolean needWritePermissions)
Build a directory name out of a root and relative path, guessing the significant part and checking for the file availability |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static File getSourceDirectory(String indexName,
Properties properties,
boolean needWritePermissions)
indexName - the name of the index (directory) to createproperties - the configuration propertiesneedWritePermissions - when true the directory will be tested for read-write permissions.
public static org.apache.lucene.store.FSDirectory createFSIndex(File indexDir,
Properties properties)
throws IOException
indexDir - the directory where to write a new indexproperties - the configuration properties
FSDirectory instance
IOException - if an errorpublic static void initializeIndexIfNeeded(org.apache.lucene.store.Directory directory)
directory - the Directory to initialize
SearchException - in case of lock acquisition timeouts, IOException, or if a corrupt index is found
public static org.apache.lucene.store.LockFactory createLockFactory(File indexDir,
Properties dirConfiguration)
indexDir - the directory to use to store locks, if needed by implementationdirConfiguration - the configuration of current DirectoryProvider
IOException - if any.
public 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 writable
SearchException - if any.
public static long getCopyBufferSize(String indexName,
Properties properties)
indexName - the index nameproperties - the configuration properties
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||