Package org.hibernate.search.store
Class FSSlaveDirectoryProvider
java.lang.Object
org.hibernate.search.store.FSSlaveDirectoryProvider
- All Implemented Interfaces:
DirectoryProvider<Directory>
File based directory provider that takes care of getting a version of the index
from a given source.
The base directory is represented by hibernate.search..indexBase
The index is created in /
The source (aka copy) directory is built from /
A copy is triggered every refresh seconds
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanReturns an initialized Lucene Directory.inthashCode()voidinitialize(String directoryProviderName, Properties properties, BuildContext context) get the information to initialize the directory and build its hashCode/equals methodprotected voidscheduleTask(TimerTask task, long period) voidstart()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
-
FSSlaveDirectoryProvider
public FSSlaveDirectoryProvider()
-
-
Method Details
-
initialize
Description copied from interface:DirectoryProviderget the information to initialize the directory and build its hashCode/equals method- Specified by:
initializein interfaceDirectoryProvider<Directory>
-
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<Directory>
-
getDirectory
Description copied from interface:DirectoryProviderReturns an initialized Lucene Directory. This method call must be threadsafe- Specified by:
getDirectoryin interfaceDirectoryProvider<Directory>
-
equals
-
hashCode
public int hashCode() -
attemptInitializeAndStart
protected boolean attemptInitializeAndStart()- Returns:
- true if both initialize and start succeeded
-
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<Directory>
-
scheduleTask
-