org.hibernate.search.store
Class FSMasterDirectoryProvider

java.lang.Object
  extended by org.hibernate.search.store.FSMasterDirectoryProvider
All Implemented Interfaces:
DirectoryProvider<org.apache.lucene.store.FSDirectory>

public class FSMasterDirectoryProvider
extends java.lang.Object
implements DirectoryProvider<org.apache.lucene.store.FSDirectory>

File based DirectoryProvider that takes care of index copy 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

Author:
Emmanuel Bernard, Sanne Grinovero

Constructor Summary
FSMasterDirectoryProvider()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 org.apache.lucene.store.FSDirectory getDirectory()
          Returns an initialized Lucene Directory.
 int hashCode()
           
 void initialize(java.lang.String directoryProviderName, java.util.Properties properties, SearchFactoryImplementor searchFactoryImplementor)
          get the information to initialize the directory and build its hashCode/equals method
 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
 void stop()
          Executed when the search factory is closed.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSMasterDirectoryProvider

public FSMasterDirectoryProvider()
Method Detail

initialize

public void initialize(java.lang.String directoryProviderName,
                       java.util.Properties properties,
                       SearchFactoryImplementor searchFactoryImplementor)
Description copied from interface: DirectoryProvider
get the information to initialize the directory and build its hashCode/equals method

Specified by:
initialize in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>

start

public void start()
Description copied from interface: DirectoryProvider
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

Specified by:
start in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>

getDirectory

public org.apache.lucene.store.FSDirectory getDirectory()
Description copied from interface: DirectoryProvider
Returns an initialized Lucene Directory. This method call must be threadsafe

Specified by:
getDirectory in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

stop

public void stop()
Description copied from interface: DirectoryProvider
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

Specified by:
stop in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>


Copyright © 2006-2010 Hibernate. All Rights Reserved.