[hibernate-dev] [HSEARCH] Breaking some contracts

Emmanuel Bernard emmanuel at hibernate.org
Mon Jun 7 10:43:53 EDT 2010


Trying again with the txt extension this time.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: new_initialize_contracts.patch.txt
Url: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20100607/4f914229/attachment.txt 
-------------- next part --------------


On 7 juin 2010, at 16:34, Emmanuel Bernard wrote:

> Hi guys
> I've been working on HSEARCH-397 lately.
> I had to do HSEARCH-541. I had to change the initialize contract of many SPIs:
> - ReaderProvider
> - Worker
> - DirectoryProvider
> - BackendQueueProcessorFactory
> - OptimizerStrategy
> 
> The idea is to pass a BuildContext, WritableBuildContect and WorkerBuildContext object to initialize and containing a subset of the SearchFactoryImplementor contract.
> For services that require a reference to the SFI, I've provided an getUnititializedSearchFactoryImplementor() whose object cannot be used until after initialize is done.
> 
> The bad news is that it breaks some semi public contracts. The good news is that it opens the doors to:
> - create a SearchFactoryBuilder (that will help solve HSEARCH-397)
> - make SearchFactoryImpl immutable (Sanne will like it)..
> 
> What do you think? I think the benefit is worth breaking the contracts. I've attached the burst of patches that lead to this.
> 
> 
> 
> PS Maybe I could create a SFImplementor simulator for legacy implementations, but that complicates things.
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev



More information about the hibernate-dev mailing list