commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Cooke" <Tony.Co...@elders.com.au>
Subject RE: [commons vfs] ftp DefaultFileMonitor issue
Date Fri, 07 Jul 2006 08:30:04 GMT
> There are two kind of caches in VFS, one which is responsible to hand
> out the FileObject instance itself - where we try hard to hand out
> always the same instance for the same file (=filename/filesystem
> combination) and another cache inside the FileObject which holds stuff
> like children and file informations.
> The CacheStrategy tells the system when to refresh the second cache.

OK. That makes sense.


> Thanks for the code snipped. I tried it with the default
> VFS.getManager() (without setting the CacheStrategy) and it works here
> with my ftp server as expected.
> I am pretty sure for your tests you do not use a delay of 60000, do
you?
> I tried it with 5000 (5 seconds) and get the events promptly.

What I'm monitoring is a site that our company has paid money to get
weather information from. As the current weather file is only being
updated on the site every 15 to 30 minutes I didn't think I really
needed to monitor the site every second or even 5. Actually I'd probably
be OK monitoring it every 10 to 15 minutes.


> But ...... I pointed the monitor to a directory ....
> 
> > And this is how I run my checks:
> >
> >   try {
> >     for (int i = 0; 1 < 100; i++) {
> >       Thread.sleep(60000); //  1 minute
> >       System.out.println(file.getContent().getLastModifiedTime() + "
"
> > + file.getName());
> >     }
> >   } catch (InterruptedException ie) {
> >     ie.printStackTrace();
> >   }
> >
> .... ok - got it. Its a bug in the FTPFileObject, unhappily I have no
> workaround yet.
> Could you please open a ticket at http://issues.apache.org/jira I'll
see
> if I can fix it soon.

No problems. I'll open a ticket soon.

Thanks Mario. Sorry for giving you more work.  :-(


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message