Create this class with the given starting capacity.
Method Detail
watch
public void watch(java.lang.Object key,
java.lang.Object resource)
Tells the monitor to watch the given resource, timestamps it
and associate it to the given key.
hasChanged
public boolean hasChanged(java.lang.Object context)
Queries the monitor for changes. For maximum reliability, this
method is synchronous, but less reliable for faster asynchronous
versions could be implemented. Returns true if the resource
associated to the given key has changed since the last call
to watch.
WARNING: due to a stupid bug in "FileURLConnection", the
class that implements the "file:" protocol for the java.net.URL
framework, the getLastModified() method always returns 0.
For this reason, the use of the File resource is strongly
suggested over the "file:" type URL.
NOTE: this may not be (and should not be) the case in other
virtual machine implementations or if we rewrite the URL
handler ourselves (which I don't care to do at this point).
invalidate
public void invalidate(java.lang.Object context)
Invalidates the given context.
timestamp
public static long timestamp(java.lang.Object resource)
Create a timestamp indicating the last modified time
of the given resource.