[ 
https://issues.apache.org/jira/browse/LUCENE-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13606462#comment-13606462
 ] 

Michael Poindexter edited comment on LUCENE-4848 at 3/19/13 4:23 PM:
---------------------------------------------------------------------

bq. One small thing: The protected method FSIndexInput#length() does not need 
the generic FD, it should be parameterless? The FD is known to the subclass, 
isnt it?

2 reasons not to:
1.) I think there is already a parameterless length() method that behaves 
slightly differently.  This length(T) is intended to extract the full length 
from the file accessor, while length() returns the configured length of the 
slice.
2.) It is called from the constructor, so it might be considered bad practice 
to access member variables since that can be error prone.


                
      was (Author: mpoindexter):
    <blockquote>
One small thing: The protected method FSIndexInput#length() does not need the 
generic FD, it should be parameterless? The FD is known to the subclass, isnt 
it?
</blockquote>

2 reasons not to:
1.) I think there is already a parameterless length() method that behaves 
slightly differently.  This length(T) is intended to extract the full length 
from the file accessor, while length() returns the configured length of the 
slice.
2.) It is called from the constructor, so it might be considered bad practice 
to access member variables since that can be error prone.


                  
> Add Directory implementations using NIO2 APIs
> ---------------------------------------------
>
>                 Key: LUCENE-4848
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4848
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Michael Poindexter
>            Assignee: Uwe Schindler
>            Priority: Minor
>         Attachments: jdk7directory.zip, LUCENE-4848-MMapDirectory.patch, 
> LUCENE-4848.patch
>
>
> I have implemented 3 Directory subclasses using NIO2 API's (available on 
> JDK7).  These may be suitable for inclusion in a Lucene contrib module.
> See the mailing list at http://lucene.markmail.org/thread/lrv7miivzmjm3ml5 
> for more details about this code and the advantages it provides.
> The code is attached as a zip to this issue.  I'll be happy to make any 
> changes requested.  I've included some minimal smoke tests, but any help in 
> how to use the normal Lucene tests to perform more thorough testing would be 
> appreciated.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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]

Reply via email to