Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Direct I/O

Reply
Thread Tools

Direct I/O

 
 
Tony Hannan
Guest
Posts: n/a
 
      01-23-2006
Hello all,

Do the direct buffers in the java.nio package have the same effect as
using the open function with the O_DIRECT flag in Linux?

I am the TA for a database implementations class and we want to access
disk directly and do our own buffering. We are treating a single OS file
like a disk partition.

Thanks,
Tony
 
Reply With Quote
 
 
 
 
John C. Bollinger
Guest
Posts: n/a
 
      01-24-2006
Tony Hannan wrote:
> Hello all,
>
> Do the direct buffers in the java.nio package have the same effect as
> using the open function with the O_DIRECT flag in Linux?


I can't tell for sure from the docs, which means that you cannot rely on
it being so. The two sound similar, but it is not clear whether an NIO
direct buffer bypasses only Java-side caching or both Java and native
caching.

> I am the TA for a database implementations class and we want to access
> disk directly and do our own buffering. We are treating a single OS file
> like a disk partition.


I know of nothing more likely to get what you ask in Java than a direct
ByteBuffer, as you suggested. If you are not already aware of it, then
you should also look at method FileChannel.force() as a complement /
failsafe.

Sorry I can't be more definite.

--
John Bollinger
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Direct instantiation and configuration Rick Jackson VHDL 8 12-02-2005 01:32 PM
Is there a good re-direct killer? B. Peg Firefox 0 06-25-2005 02:50 PM
Direct Render cameron Firefox 4 02-01-2005 08:07 PM
direct instantiation, libraries valentin tihomirov VHDL 6 04-26-2004 12:03 PM
Equivalent for Ascend-IP-Direct Attribute / Forced Proxy on NAS? Emre Bastuz Cisco 1 01-02-2004 06:04 PM



Advertisments