回复: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-08-07 Thread wangzhijiang999
nfusings.   - 原邮件 - 发件人: Uwe Schindler 收件人: java-user@lucene.apache.org 抄送: 发送日期: 2013年8月7日, 星期三, 1:17 下午 主题: RE: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory Hi, 1) ByteBuffer bb=ByteBuffer.wrap(new byte[len]);  //bb is HeapByteBuffer     channel.read

RE: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-08-07 Thread Uwe Schindler
ijiang...@aliyun.com [mailto:wangzhijiang...@aliyun.com] Sent: Wednesday, August 07, 2013 11:36 AM To: java-user Subject: 回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory Hi Uwe: Thank you for your detail explaination and I learnt a lot from your message. First, the direct

回复:RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-08-07 Thread wangzhijiang999
---发件人:Uwe Schindler发送日期:2013年7月31日 18:18收件人:java-user@lucene.apache.org;wangzhijiang...@yahoo.com.cn;主 题:RE: why lucene not use DirectByteBuffer in NIOFSDirectory Hi,There is a misunderstanding: Just by allocating a direct buffer, there is still no difference to a heap buffer in the workflo

RE: why lucene not use DirectByteBuffer in NIOFSDirectory

2013-07-31 Thread Uwe Schindler
Hi, There is a misunderstanding: Just by allocating a direct buffer, there is still no difference to a heap buffer in the workflow! NIO will read the data from file, copy it to FS cache and then the positional read() system call (used by NIO) copies the FS cache contents to the direct buffer,