Package org.hibernate.search.store
Class FSDirectoryProvider
java.lang.Object
org.hibernate.search.store.FSDirectoryProvider
- All Implemented Interfaces:
DirectoryProvider<FSDirectory>
Use a Lucene
FSDirectory. The base directory is represented by the property hibernate.search.default.indexBase
or hibernate.search.<index>.indexBase. The former defines the default base directory for all indexes whereas the
latter allows to override the base directory on a per index basis. <index> has to be replaced with the fully qualified
classname of the indexed class or the value of the index property of the @Indexed annotation.
The actual index files are then created in <indexBase>/<index name>, <index name> is
per default the name of the indexed entity, or the value of the index property of the @Indexed or can be specified
as property in the configuration file using hibernate.search.<index>.indexName.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns an initialized Lucene Directory.inthashCode()voidinitialize(String directoryProviderName, Properties properties, BuildContext context) get the information to initialize the directory and build its hashCode/equals methodvoidstart()Executed after initialize, this method set up the heavy process of starting up the DirectoryProvider IO processing as well as background processing are expected to be set up herevoidstop()Executed when the search factory is closed.
-
Constructor Details
-
FSDirectoryProvider
public FSDirectoryProvider()
-
-
Method Details
-
initialize
Description copied from interface:DirectoryProviderget the information to initialize the directory and build its hashCode/equals method- Specified by:
initializein interfaceDirectoryProvider<FSDirectory>
-
start
public void start()Description copied from interface:DirectoryProviderExecuted after initialize, this method set up the heavy process of starting up the DirectoryProvider IO processing as well as background processing are expected to be set up here- Specified by:
startin interfaceDirectoryProvider<FSDirectory>
-
stop
public void stop()Description copied from interface:DirectoryProviderExecuted when the search factory is closed. This method should stop any background process as well as releasing any resource. This method should avoid raising exceptions and log potential errors instead- Specified by:
stopin interfaceDirectoryProvider<FSDirectory>
-
getDirectory
Description copied from interface:DirectoryProviderReturns an initialized Lucene Directory. This method call must be threadsafe- Specified by:
getDirectoryin interfaceDirectoryProvider<FSDirectory>
-
equals
-
hashCode
public int hashCode()
-