Return-Path:
+ * Canonical usage:
+ *
* RetryLoop retryLoop = client.newRetryLoop();
* while ( retryLoop.shouldContinue() )
* {
@@ -54,7 +54,7 @@ import java.util.concurrent.atomic.AtomicReference;
* retryLoop.takeException(e);
* }
* }
- *
+ *
*/
public class RetryLoop
{
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java b/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
index 8ae5e74..ec77b35 100644
--- a/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
+++ b/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
@@ -45,18 +45,19 @@ import java.util.concurrent.atomic.AtomicBoolean;
*
* * Here's an example: + *
** The SessionFailRetryLoop prevents this type of scenario. When a session failure is detected, @@ -65,8 +66,8 @@ import java.util.concurrent.atomic.AtomicBoolean; * set of operations or fail (depending on {@link SessionFailRetryLoop.Mode}) *
* - * Canonical usage:
+ * Canonical usage:
+ *
* SessionFailRetryLoop retryLoop = client.newSessionFailRetryLoop(mode);
* retryLoop.start();
* try
@@ -87,7 +88,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
* {
* retryLoop.close();
* }
- *
+ *
*/
public class SessionFailRetryLoop implements Closeable
{
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java b/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java
index 6b6a475..1082afb 100644
--- a/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java
+++ b/curator-client/src/main/java/org/apache/curator/utils/CloseableUtils.java
@@ -26,9 +26,7 @@ import java.io.Closeable;
import java.io.IOException;
/**
- * @author Andy Boothe * Utility to ensure that a particular path is created. *
- * ** The first time it is used, a synchronized call to {@link ZKPaths#mkdirs(ZooKeeper, String)} is made to * ensure that the entire path has been created (with an empty byte array if needed). Subsequent * calls with the instance are un-synchronized NOPs. *
- * *
- * Usage:
- *
+ * Usage:
+ *
* EnsurePath ensurePath = new EnsurePath(aFullPathToEnsure); * ... * String nodePath = aFullPathToEnsure + "/foo"; @@ -47,8 +46,7 @@ import java.util.concurrent.atomic.AtomicReference; * ... * ensurePath.ensure(zk); // subsequent times are NOPs * zk.create(nodePath, ...); - *- * + * */ public class EnsurePath { http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java index e49386e..dcbc567 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java @@ -74,7 +74,7 @@ public interface CuratorFramework extends Closeable /** * Start an exists builder - * + *
* The builder will return a Stat object as if org.apache.zookeeper.ZooKeeper.exists() were called. Thus, a null
* means that it does not exist and an actual Stat object means it does exist.
*
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java
index 8109f13..d29b475 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java
@@ -33,9 +33,9 @@ public interface CreateBuilder extends
/**
* @deprecated this has been generalized to support all create modes. Instead, use:
- *
* The general form for this interface is:
- *
* Here's an example that creates two nodes in a transaction
- *
+ *
* @return this
*/
public ACLPathAndBytesable
+ *
* client.create().withProtection().withMode(CreateMode.PERSISTENT_SEQUENTIAL)...
- *
+ *
* curator.inTransaction().operation().arguments().forPath(...).
* and().more-operations.
* and().commit();
- *
+ *
*
+ *
+ *
* curator.inTransaction().
* create().forPath("/path-one", path-one-data).
* and().create().forPath("/path-two", path-two-data).
* and().commit();
- *
- *
* Important: the operations are not submitted until
* {@link CuratorTransactionFinal#commit()} is called.
@@ -73,7 +75,7 @@ public interface CuratorTransaction
/**
* Start a check builder in the transaction
- *
+ *ChildData
* @return builder object
*/
public TransactionCheckBuilder check();
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java b/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java
index 86ca457..03bbca2 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionResult.java
@@ -33,9 +33,9 @@ public class CuratorTransactionResult
/**
* Utility that can be passed to Google Guava to find a particular result. E.g.
- * A utility that attempts to keep all data from all children of a ZK path locally cached. This class
* will watch the ZK path, respond to update/create/delete events, pull down the data, etc. You can
* register a listener that will get notified when changes occur. IMPORTANT - it's not possible to stay transactionally in sync. Users of this class must
* be prepared for false-positives and false-negatives. Additionally, always use the version number
* when updating data to avoid overwriting another process' change.
* This method is synchronized because it has to check state about whether this instance is still open. Without this check
* there is a race condition with the dataWatchers that get set. Even after this object is closed() it can still be
* called by those watchers, because the close() method cannot actually disable the watcher.
- *
* The synchronization overhead should be minimal if non-existant as this is generally only called from the
* ZK client thread and will only contend if close() is called in parallel with an update, and that's the exact state
* we want to protect from.
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
index d419b98..ecdd903 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
@@ -218,9 +218,9 @@ public class LeaderLatch implements Closeable
/**
* Attaches a listener to this LeaderLatch
- *
* Attaching the same listener multiple times is a noop from the second time on.
- *
* All methods for the listener are run using the provided Executor. It is common to pass in a single-threaded
* executor so that you can be certain that listener methods are called in sequence, but if you are fine with
* them being called out of order you are welcome to use multiple threads.
@@ -234,9 +234,9 @@ public class LeaderLatch implements Closeable
/**
* Attaches a listener to this LeaderLatch
- *
* Attaching the same listener multiple times is a noop from the second time on.
- *
* All methods for the listener are run using the provided Executor. It is common to pass in a single-threaded
* executor so that you can be certain that listener methods are called in sequence, but if you are fine with
* them being called out of order you are welcome to use multiple threads.
@@ -262,25 +262,23 @@ public class LeaderLatch implements Closeable
/**
* Causes the current thread to wait until this instance acquires leadership
* unless the thread is {@linkplain Thread#interrupt interrupted} or {@linkplain #close() closed}. If this instance already is the leader then this method returns immediately. Otherwise the current
* thread becomes disabled for thread scheduling purposes and lies
- * dormant until one of three things happen:
+ * dormant until one of three things happen:
+ *
*
* @param type operation type
* @param forPath path
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/ChildData.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/ChildData.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/ChildData.java
index 399cb33..d385d4d 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/ChildData.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/ChildData.java
@@ -36,7 +36,7 @@ public class ChildData implements Comparable
+ *
* Iterables.find(results, CuratorTransactionResult.ofTypeAndPath(OperationType.CREATE, path))
- *
*
If the current thread: + * + *
If the current thread:
*then {@link InterruptedException} is thrown and the current thread's * interrupted status is cleared.
* * @throws InterruptedException if the current thread is interrupted @@ -307,13 +305,13 @@ public class LeaderLatch implements Closeable *Causes the current thread to wait until this instance acquires leadership * unless the thread is {@linkplain Thread#interrupt interrupted}, * the specified waiting time elapses or the instance is {@linkplain #close() closed}.
- * + * *If this instance already is the leader then this method returns immediately * with the value {@code true}.
- * + * *Otherwise the current * thread becomes disabled for thread scheduling purposes and lies - * dormant until one of four things happen: + * dormant until one of four things happen:
*If the current thread: + * + *
If the current thread:
*then {@link InterruptedException} is thrown and the current thread's * interrupted status is cleared.
- * + * *If the specified waiting time elapses or the instance is {@linkplain #close() closed} * then the value {@code false} is returned. If the time is less than or equal to zero, the method * will not wait at all.
@@ -385,7 +383,7 @@ public class LeaderLatch implements Closeable ** Returns the set of current participants in the leader selection *
- * + **
* NOTE - this method polls the ZK server. Therefore it can possibly * return a value that does not match {@link #hasLeadership()} as hasLeadership @@ -406,7 +404,7 @@ public class LeaderLatch implements Closeable * Return the id for the current leader. If for some reason there is no * current leader, a dummy participant is returned. *
- * + **
* NOTE - this method polls the ZK server. Therefore it can possibly * return a value that does not match {@link #hasLeadership()} as hasLeadership http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java ---------------------------------------------------------------------- diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java index 1a2470c..e7b61f9 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java @@ -54,7 +54,6 @@ import java.util.concurrent.atomic.AtomicReference; * be assigned leader until it releases leadership at which time another one from the group will * be chosen. *
- * *
* Note that this class uses an underlying {@link InterProcessMutex} and as a result leader
* election is "fair" - each user will become leader in the order originally requested
@@ -202,7 +201,7 @@ public class LeaderSelector implements Closeable
/**
* Attempt leadership. This attempt is done in the background - i.e. this method returns
- * immediately.
+ * immediately.
* IMPORTANT: previous versions allowed this method to be called multiple times. This
* is no longer supported. Use {@link #requeue()} for this purpose.
*/
@@ -278,7 +277,7 @@ public class LeaderSelector implements Closeable
*
* Returns the set of current participants in the leader selection *
- * + **
* NOTE - this method polls the ZK server. Therefore it can possibly * return a value that does not match {@link #hasLeadership()} as hasLeadership @@ -323,7 +322,7 @@ public class LeaderSelector implements Closeable * Return the id for the current leader. If for some reason there is no * current leader, a dummy participant is returned. *
- * + **
* NOTE - this method polls the ZK server. Therefore it can possibly * return a value that does not match {@link #hasLeadership()} as hasLeadership http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java ---------------------------------------------------------------------- diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java index fafde5f..d5b0036 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessReadWriteLock.java @@ -39,13 +39,13 @@ import java.util.List; *
* *
- * Reentrancy
+ * Reentrancy
* This lock allows both readers and writers to reacquire read or write locks in the style of a
* re-entrant lock. Non-re-entrant readers are not allowed until all write locks held by the
* writing thread/process have been released. Additionally, a writer can acquire the read lock, but not
- * vice-versa. If a reader tries to acquire the write lock it will never succeed.
+ * vice-versa. If a reader tries to acquire the write lock it will never succeed.
*
- * Lock downgrading
+ * Lock downgrading
* Re-entrancy also allows downgrading from the write lock to a read lock, by acquiring the write
* lock, then the read lock and then releasing the write lock. However, upgrading from a read
* lock to the write lock is not possible.
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
index fd27cbb..52b8d8f 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreV2.java
@@ -49,27 +49,23 @@ import java.util.concurrent.TimeUnit;
* Further, this semaphore is mostly "fair" - each user will get a lease in the order requested
* (from ZK's point of view).
*
* There are two modes for determining the max leases for the semaphore. In the first mode the * max leases is a convention maintained by the users of a given path. In the second mode a * {@link SharedCountReader} is used as the method for semaphores of a given path to determine * the max leases. *
- * ** If a {@link SharedCountReader} is not used, no internal checks are done to prevent * Process A acting as if there are 10 leases and Process B acting as if there are 20. Therefore, * make sure that all instances in all processes use the same numberOfLeases value. *
- * *
* The various acquire methods return {@link Lease} objects that represent acquired leases. Clients
* must take care to close lease objects (ideally in a finally
* block) else the lease will be lost. However, if the client session drops (crash, etc.),
* any leases held by the client are automatically closed and made available to other clients.
*
* Thanks to Ben Bangert (ben@groovie.org) for the algorithm used. *
@@ -194,7 +190,6 @@ public class InterProcessSemaphoreV2 /** *Acquire a lease. If no leases are available, this method blocks until either the maximum * number of leases is increased or another client/process closes a lease.
- * *The client must close the lease when it is done with it. You should do this in a
* finally
block.
Acquire qty
leases. If there are not enough leases available, this method
* blocks until either the maximum number of leases is increased enough or other clients/processes
* close enough leases.
The client must close the leases when it is done with them. You should do this in a
* finally
block. NOTE: You can use {@link #returnAll(Collection)} for this.
Acquire a lease. If no leases are available, this method blocks until either the maximum * number of leases is increased or another client/process closes a lease. However, this method * will only block to a maximum of the time parameters given.
- * *The client must close the lease when it is done with it. You should do this in a
* finally
block.
The client must close the leases when it is done with them. You should do this in a
* finally
block. NOTE: You can use {@link #returnAll(Collection)} for this.
* Thanks to bbeck (https://github.com/bbeck) for the initial coding and design *
http://git-wip-us.apache.org/repos/asf/curator/blob/c7968b92/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedDelayQueue.java ---------------------------------------------------------------------- diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedDelayQueue.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedDelayQueue.java index eb55989..b84471f 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedDelayQueue.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedDelayQueue.java @@ -121,7 +121,7 @@ public class DistributedDelayQueue
- * Guarantees:
+ * Guarantees:
+ *
* @Path("/")
* public class MyResource extends DiscoveryResource<Void> {
* public MyResource(@Context ContextResolver<DiscoveryContext<Void>> resolver) {
@@ -64,7 +64,7 @@ import java.util.List;
* super(resolver.getContext(DiscoveryContext.class));
* }
* }
- *
+ *
*/
public abstract class DiscoveryResource