[
https://issues.apache.org/jira/browse/LUCENE-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201504#comment-13201504
]
Uwe Schindler commented on LUCENE-3736:
---------------------------------------
If you look at the test cases, the code is much less verbose and better
readable.
The good thing of the builder pattern (remember the class is actually called
"Builder") is that nobody is required to use it). But I prefer to chain calls
so I want to have the opportunity to do that.
Returning void of itsself is no difference in bytecode or performance, it just
adds a possibility. And everybody expects that when he sees a class named
"Builder" with a method build().
I().dont().want().to().start().fights().here().again(), but this time I will
not change the patch that forces me to use another pattern i dont like. Code
without chaining here looks horrible.
Just
rewrite
the
test
,
you
have
to
declare
an
additional
variable
with
a
very
verbose
name
.
If somebody wants to change this, he can do this in another issue called
"remove all builders from Lucene", but then please also rename the methods away
from build() and rename the classes.
> ParallelReader is now atomic, rename to ParallelAtomicReader and also add a
> ParallelCompositeReader (that requires LogDocMergePolicy to have identical
> subreader structure)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3736
> URL: https://issues.apache.org/jira/browse/LUCENE-3736
> Project: Lucene - Java
> Issue Type: Sub-task
> Components: core/index
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 4.0
>
> Attachments: LUCENE-3736.patch, LUCENE-3736.patch, LUCENE-3736.patch
>
>
> The plan is:
> - Move all subreaders to ctor (builder-like API. First build reader-set, then
> call build)
> - Rename ParallelReader to ParallelAtomicReader
> - Add a ParallelCompositeReader with same builder API, but taking any
> CompositeReader-set and checks them that they are aligned (docStarts
> identical). The subreaders are ParallelAtomicReaders.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]