org.hibernate.search.store
public interface: DirectoryProvider [javadoc |
source]
All Known Implementing Classes:
FSDirectoryProvider, RAMDirectoryProvider, FSMasterDirectoryProvider, FSSlaveDirectoryProvider
Set up and provide a Lucene
Directory
equals() and
hashCode() must guaranty equality
between two providers pointing to the same underlying Lucene Store.
Besides that, hashCode ordering is used to avoid deadlock when locking a directory provider.
This class must be thread safe regarding
getDirectory() calls
- author:
Emmanuel - Bernard
- author:
Sylvain - Vieujot
| Method from org.hibernate.search.store.DirectoryProvider Detail: |
public TDirectory getDirectory()
Returns an initialized Lucene Directory. This method call must be threadsafe |
public void initialize(String directoryProviderName,
Properties properties,
SearchFactoryImplementor searchFactoryImplementor)
get the information to initialize the directory and build its hashCode/equals method |
public void start()
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 here |
public void stop()
Executed 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 |