This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FileDescriptor suggestion [Was: FYI: Patch: java nio file locking]


Michael Koch wrote:

Why should we write two or more FileChannel implementations when we only
need one with just some different native implementations ?

I agree that it seems simpler to stick with that model for now. However, my understanding of the "PlatformFileDescriptor" proposal is that some people want separate platform sub-classes. That does have some potential advantages (can write platform-specific code in Java, rather than native).

But for now, I propose being less radical:
gnu.java.nio.channels.FileChannelImpl would have a single
FileChannelImpl.java, with natFileChannelPosix.cc etc
renamed with a symlink to natFileChannelImpl.cc.

> Why do you dont like everythink we
have now ? We had not much problems with it.

I'm trying to understand the various design constraints before trying to get consensus on a nio design that is efficient and we can live with long-term. This discussion has been very useful, I think.

The existing code is good, but I think it would be improved by
"refactoring", and I think it makes sense to do it now while
java.nio is unfinished.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]