Repository: curator
Updated Branches:
  refs/heads/CURATOR-88 05d5420f1 -> fbd9c39ca


Added doc


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/248bb2a8
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/248bb2a8
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/248bb2a8

Branch: refs/heads/CURATOR-88
Commit: 248bb2a8b0088c9d831c912250fa6aba733bbc2c
Parents: 05d5420
Author: randgalt <randg...@apache.org>
Authored: Fri Mar 7 08:35:47 2014 -0500
Committer: randgalt <randg...@apache.org>
Committed: Fri Mar 7 08:35:47 2014 -0500

----------------------------------------------------------------------
 .../locks/InterProcessSemaphoreReadWrite.java     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/248bb2a8/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreReadWrite.java
----------------------------------------------------------------------
diff --git 
a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreReadWrite.java
 
b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreReadWrite.java
index 26912c0..e1118db 100644
--- 
a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreReadWrite.java
+++ 
b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreReadWrite.java
@@ -29,6 +29,24 @@ import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 
+/**
+ * <p>
+ *     A NON re-entrant read-write lock that works across JVMs. Uses Zookeeper 
to hold
+ *     the lock. All processes in all JVMs that use the same lock path will 
achieve an
+ *     inter-process critical section. Further, this mutex is "fair" - each 
user will
+ *     get the mutex in the order requested (from ZK's point of view).
+ * </p>
+ *
+ * <p>
+ *    A read write lock maintains a pair of associated locks, one for 
read-only operations and one
+ *    for writing. The read lock may be held simultaneously by multiple reader 
processes, so long as
+ *    there are no writers. The write lock is exclusive.
+ * </p>
+ *
+ * <p>
+ *    Note: lock upgrading/downgrading is NOT supported by this implementation.
+ * </p>
+ */
 public class InterProcessSemaphoreReadWrite implements 
InterProcessReadWriteLockBase
 {
     private final InterProcessSemaphoreV2 lock;

Reply via email to