WatchService questions
Sebastian Sickelmann
sebastian.sickelmann at gmx.de
Mon Jan 11 13:51:49 PST 2010
Alan Bateman wrote:
> Sebastian Sickelmann wrote:
> > I think both solutions (Implementation 2A and 2B) are only realy good in
> multithreaded environments. When there is only
> > one other programm or thread that writes to the watched Directory
> Implementation 1 will be faster.
> > The order of the MODIFY-EVENTS of different contexts are than relative
> to the ==first== Modification of the contexts.
> >
> If you have cycles to experiment and send results that would be great.
> Also it's good to think about different scenarios where there is one or
> several programs changing files. One thing to mention about our
> implementations is that the 3 native implementations use a single poller
> thread per watch service. So if you are hacking on
> AbstractWatchKey.signalEvent then there will be only one producer. The
> polling implementation could potentially have concurrent threads polling
> directories but they will be different directories (never the same
> directory) and events are queued on per watch key basis so again only
> one producer.
I have done the Implementations of 2A and 2B. It based on your suggested Change (6907760) http://cr.openjdk.java.net/~alanb/6907760/webrev.00/raw_files/new/src/share/classes/sun/nio/fs/AbstractWatchKey.java
Should i send it via mailing-list? Maybe it is better to append the source to an enhancement-ticket in bugzilla?
Btw. is there a way to faster Compile changes in NIO? Calling make in
the top-level openjdk-dir leads my to a long wait time. Is there an good document for this. I cant find one!!
>
> > But what should be done with other Events than StdWatchEventKind?
> >
> Our implementation does support a non-standard modifier when registering
> events but it doesn't support any additional events at this time. For
> now, it is okay to focus only on ENTRY_MODIFY events and assume that you
> can't reorder other events.
OK, so thinks are easier.
>
> -Alan.
>
>
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the nio-dev
mailing list