directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Wallace <rwall...@thewallacepack.net>
Subject Re: OT: Psuedo Async File IO
Date Sat, 09 Apr 2005 05:38:52 GMT
Java NIO doesn't support non-blocking file IO.  Only non-blocking socket 
IO.  If you look you'll see that the FileChannel does not extend the 
SelectableChannel and so cannot be set to non-blocking mode or 
registered with a selector.

Ben Walding wrote:
> Am I confused, or is Java NIO not what you're looking for?
> 
> http://java.sun.com/j2se/1.4.2/docs/guide/nio/
> 
> Mike Spille wrote some wrappers around NIO, but I'm not sure how active 
> they are:
> 
> http://sourceforge.net/projects/pyrasun/
> 
> Richard Wallace wrote:
> 
>> Hey everyone,
>>
>> I'm getting to a point with my smtp protocol provider that I need to 
>> start thinking about file IO.  Since there is no support for 
>> non-blocking IO in Java yet I need something that fakes it.  I was 
>> wondering if anyone had any experience with any existing components 
>> that do this.  If there aren't any really good ones that anyone can 
>> recommend I'll probably wind up writing something on my own.
>>
>> I'm kind of thinking it should basically be a component that uses a 
>> single thread to monitor a queue for IO requests and then uses 
>> something like the IoHandler in MINA to let clients know when 
>> reads/writes have started/stopped/failed.
>>
>> Any input on existing components or what would be necessary to maybe 
>> repurpose parts of MINA for this task would be great.
>>
>> Thanks,
>> Rich
>>
> 

Mime
View raw message