git://source.jalview.org
/
vamsas.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
comments and removed spurious todo:
[vamsas.git]
/
src
/
org
/
vamsas
/
client
/
simpleclient
/
FileWatcher.java
diff --git
a/src/org/vamsas/client/simpleclient/FileWatcher.java
b/src/org/vamsas/client/simpleclient/FileWatcher.java
index
83b7b93
..
bebf1a4
100644
(file)
--- a/
src/org/vamsas/client/simpleclient/FileWatcher.java
+++ b/
src/org/vamsas/client/simpleclient/FileWatcher.java
@@
-7,8
+7,10
@@
import java.io.File;
/**
/**
- * @author jim Watches a particular file for its creation, deletion, or
- * modification.
+ * Watches a particular file for its creation, deletion, or
+ * modification. The watcher is thread safe and different
+ * instances watching the state of a particular file carry
+ * their own state record for the file.
*/
public class FileWatcher {
*/
public class FileWatcher {
@@
-32,7
+34,7
@@
public class FileWatcher {
subjectLock=null;
}
/**
subjectLock=null;
}
/**
- *
+ *
* @return true if subject exists and is locked by another process.
*/
private boolean checkLock() {
* @return true if subject exists and is locked by another process.
*/
private boolean checkLock() {
@@
-42,7
+44,6
@@
public class FileWatcher {
}
subjectLock = new Lock(subject);
if (subjectLock.isLocked()) {
}
subjectLock = new Lock(subject);
if (subjectLock.isLocked()) {
- // subjectLock.release();
return false;
}
clearLock();
return false;
}
clearLock();
@@
-121,7
+122,6
@@
public class FileWatcher {
*/
public FileWatcher(File subject) {
*/
public FileWatcher(File subject) {
- // TODO Auto-generated constructor stub
this.subject = subject;
setState();
}
this.subject = subject;
setState();
}