Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Direct I/O

Thread view: 
Tony Hannan - 23 Jan 2006 16:11 GMT
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
John C. Bollinger - 24 Jan 2006 03:49 GMT
> 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.

Signature

John Bollinger
jobollin@indiana.edu



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.