You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ti...@apache.org on 2023/08/15 08:32:51 UTC

[curator-site] branch main updated (c17329a -> ed363e7)

This is an automated email from the ASF dual-hosted git repository.

tison pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/curator-site.git


    from c17329a  initialize
     new 51cd05b  style: align code blocks
     new 36bbdd0  fix: show sidebar for standalone docs pages
     new a6f9d08  style: more align code blocks
     new 125608f  style: more align code blocks
     new ed363e7  fix: broken link to wiki.apache.org

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/async-details.md                      |  1 -
 docs/errors.md                             |  4 ++--
 docs/modeled-components.md                 |  4 ++++
 docs/modeled-typed.md                      |  4 ++++
 docs/recipes-curator-cache.md              |  2 +-
 docs/recipes-distributed-delay-queue.md    | 10 +++++-----
 docs/recipes-distributed-priority-queue.md | 12 ++++++------
 docs/recipes-distributed-queue.md          | 10 +++++-----
 docs/recipes-path-cache.md                 |  2 +-
 docs/recipes-persistent-ttl-node.md        |  2 +-
 docs/recipes-shared-counter.md             |  6 +++---
 docs/recipes-shared-reentrant-lock.md      |  4 ++--
 docs/recipes-shared-semaphore.md           |  2 +-
 docs/service-discovery.md                  |  2 +-
 docs/tech-note-03.md                       |  2 +-
 docs/utilities.md                          |  2 +-
 16 files changed, 38 insertions(+), 31 deletions(-)


[curator-site] 02/05: fix: show sidebar for standalone docs pages

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/curator-site.git

commit 36bbdd02514a23d2a6b09b24743ca10908e28d6a
Author: tison <wa...@gmail.com>
AuthorDate: Tue Aug 15 16:23:04 2023 +0800

    fix: show sidebar for standalone docs pages
    
    Signed-off-by: tison <wa...@gmail.com>
---
 docs/modeled-components.md | 4 ++++
 docs/modeled-typed.md      | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/docs/modeled-components.md b/docs/modeled-components.md
index dc56de6..bc7c4f5 100644
--- a/docs/modeled-components.md
+++ b/docs/modeled-components.md
@@ -1,3 +1,7 @@
+---
+displayed_sidebar: docs
+---
+
 # Modeled Curator - Components
 
 Modeled Curator components are intended to allow you to model your ZooKeeper usage early in your application so that the majority of the code that interacts with ZooKeeper doesn't need to be concerned with paths, byte arrays, ACLs, options, etc. The [Pub-Sub Example](https://github.com/apache/curator/tree/master/curator-examples/src/main/java/pubsub) can give you some ideas on how to accomplish this.
diff --git a/docs/modeled-typed.md b/docs/modeled-typed.md
index 2b5a258..3c0bda5 100644
--- a/docs/modeled-typed.md
+++ b/docs/modeled-typed.md
@@ -1,3 +1,7 @@
+---
+displayed_sidebar: docs
+---
+
 # Modeled Curator - Caching, Typed Parameters and Versioning
 
 In addition to its [main features](modeled-components.md) Modeled Curator also supports integrated caching, typed parameters and versioning.


[curator-site] 01/05: style: align code blocks

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/curator-site.git

commit 51cd05b822d82544ea48bc33b393b1061cb8e76d
Author: tison <wa...@gmail.com>
AuthorDate: Tue Aug 15 16:22:09 2023 +0800

    style: align code blocks
    
    Signed-off-by: tison <wa...@gmail.com>
---
 docs/recipes-distributed-delay-queue.md    | 10 +++++-----
 docs/recipes-distributed-priority-queue.md | 12 ++++++------
 docs/recipes-distributed-queue.md          | 10 +++++-----
 docs/recipes-persistent-ttl-node.md        |  2 +-
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/docs/recipes-distributed-delay-queue.md b/docs/recipes-distributed-delay-queue.md
index 1e67a7a..c9fca67 100644
--- a/docs/recipes-distributed-delay-queue.md
+++ b/docs/recipes-distributed-delay-queue.md
@@ -24,17 +24,17 @@ An implementation of a Distributed Delay Queue. A Delay Queue is similar to a Pr
 ## Creating a DistributedDelayQueue
 
 ```java
+// Parameters:
+// client - the curator client
+// consumer - message consumer
+// serializer - serializer to use for items
+// queuePath - path to store queue
 public static <T> QueueBuilder<T> builder(
     CuratorFramework client,
     QueueConsumer<T> consumer,
     QueueSerializer<T> serializer,
     java.lang.String queuePath
 );
-// Parameters:
-// client - the curator client
-// consumer - message consumer
-// serializer - serializer to use for items
-// queuePath - path to store queue
 ```
 
 ```java
diff --git a/docs/recipes-distributed-priority-queue.md b/docs/recipes-distributed-priority-queue.md
index 3eaf53f..da2b4a8 100644
--- a/docs/recipes-distributed-priority-queue.md
+++ b/docs/recipes-distributed-priority-queue.md
@@ -24,17 +24,17 @@ An implementation of the Distributed Priority Queue ZK recipe.
 ## Creating a DistributedPriorityQueue
 
 ```java
+// Parameters:
+// client - the curator client
+// consumer - message consumer
+// serializer - serializer to use for items
+// queuePath - path to store queue
 public static <T> QueueBuilder<T> builder(
     CuratorFramework client,
     QueueConsumer<T> consumer,
     QueueSerializer<T> serializer,
     java.lang.String queuePath
 );
-// Parameters:
-// client - the curator client
-// consumer - message consumer
-// serializer - serializer to use for items
-// queuePath - path to store queue
 ```
 
 ```java
@@ -44,9 +44,9 @@ DistributedPriorityQueue<MessageType> queue = builder.buildPriorityQueue(minItem
 ```
 
 ```java
-public DistributedPriorityQueue<T> buildPriorityQueue(int minItemsBeforeRefresh);
 // Parameters:
 // minItemsBeforeRefresh - minimum items to process before refreshing the item list
+public DistributedPriorityQueue<T> buildPriorityQueue(int minItemsBeforeRefresh);
 ```
 
 Build a DistributedPriorityQueue from the current builder values.
diff --git a/docs/recipes-distributed-queue.md b/docs/recipes-distributed-queue.md
index 01d8ab0..61f857a 100644
--- a/docs/recipes-distributed-queue.md
+++ b/docs/recipes-distributed-queue.md
@@ -24,17 +24,17 @@ An implementation of the Distributed Queue ZK recipe. Items put into the queue a
 ### Creating a DistributedQueue
 
 ```java
+// Parameters:
+// client - the curator client
+// consumer - functor to receive messages
+// serializer - serializer to use for items
+// queuePath - path to store queue
 public static <T> QueueBuilder<T> builder(
     CuratorFramework client,
     QueueConsumer<T> consumer,
     QueueSerializer<T> serializer,
     java.lang.String queuePath
 );
-// Parameters:
-// client - the curator client
-// consumer - functor to receive messages
-// serializer - serializer to use for items
-// queuePath - path to store queue
 ```
 
 ```java
diff --git a/docs/recipes-persistent-ttl-node.md b/docs/recipes-persistent-ttl-node.md
index 9371036..f01813e 100644
--- a/docs/recipes-persistent-ttl-node.md
+++ b/docs/recipes-persistent-ttl-node.md
@@ -15,7 +15,7 @@ PersistentTtlNode is useful when you need to create a TTL node but don't want to
 
 ## Creating a PersistentTtlNode
 
-```
+```java
 // Parameters:
 // client - client instance
 // path path for the parent ZNode


[curator-site] 05/05: fix: broken link to wiki.apache.org

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/curator-site.git

commit ed363e7f9248dc349ae8bd52b764f056e90f2faf
Author: tison <wa...@gmail.com>
AuthorDate: Tue Aug 15 16:32:41 2023 +0800

    fix: broken link to wiki.apache.org
    
    Signed-off-by: tison <wa...@gmail.com>
---
 docs/errors.md       | 4 ++--
 docs/tech-note-03.md | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/errors.md b/docs/errors.md
index fe9a1cd..1b4af91 100644
--- a/docs/errors.md
+++ b/docs/errors.md
@@ -4,7 +4,7 @@
 
 ZooKeeper is a very low level system that requires users to do a lot of housekeeping. See:
 
-* https://wiki.apache.org/hadoop/ZooKeeper/FAQ
+* https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ
 
 The Curator [Framework](framework.md) is designed to hide as much of the details/tedium of this housekeeping as is possible.
 
@@ -26,7 +26,7 @@ Curator exposes several listenable interfaces for clients to monitor the state o
 | State Change | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 [...]
 |--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [...]
 | CONNECTED    | Sent for the first successful connection to the server. NOTE: You will only get one of these messages for any CuratorFramework instance.                                                                                                                                                                                                                                                                                                                                                    [...]
-| READONLY     | The connection has gone into read-only mode. This can only happen if you pass true for CuratorFrameworkFactory.Builder.canBeReadOnly(). See the ZooKeeper doc regarding read only connections: https://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode. The connection will remain in read only mode until another state change is sent.                                                                                                                                                  [...]
+| READONLY     | The connection has gone into read-only mode. This can only happen if you pass true for CuratorFrameworkFactory.Builder.canBeReadOnly(). See the ZooKeeper doc regarding read only connections: https://cwiki.apache.org/confluence/display/HADOOP2/ZooKeeper+GSoCReadOnlyMode. The connection will remain in read only mode until another state change is sent.                                                                                                                             [...]
 | SUSPENDED    | There has been a loss of connection. Leaders, locks, etc. should suspend until the connection is re-established.                                                                                                                                                                                                                                                                                                                                                                            [...]
 | RECONNECTED  | A suspended or lost connection has been re-established.                                                                                                                                                                                                                                                                                                                                                                                                                                     [...]
 | LOST         | Curator will set the LOST state when it believes that the ZooKeeper session has expired. ZooKeeper connections have a session. When the session expires, clients must take appropriate action. In Curator, this is complicated by the fact that Curator internally manages the ZooKeeper connection. Curator will set the LOST state when any of the following occurs: a) ZooKeeper returns a Watcher.Event.KeeperState.Expired or KeeperException.Code.SESSIONEXPIRED; b) Curator closes t [...]
diff --git a/docs/tech-note-03.md b/docs/tech-note-03.md
index f28e793..2f32e4e 100644
--- a/docs/tech-note-03.md
+++ b/docs/tech-note-03.md
@@ -4,7 +4,7 @@ Dealing with session failure.
 
 ## Details
 
-ZooKeeper's clients maintain a session with the server ensemble. Ephemeral nodes are tied to this session. When writing ZooKeeper-based applications you must deal with session expirations (due to network partitions, server crashes, etc.). This ZooKeeper FAQ discusses it: http://wiki.apache.org/hadoop/ZooKeeper/FAQ#A3
+ZooKeeper's clients maintain a session with the server ensemble. Ephemeral nodes are tied to this session. When writing ZooKeeper-based applications you must deal with session expirations (due to network partitions, server crashes, etc.). This ZooKeeper FAQ discusses it: https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ
 
 For the most part, Curator shields you from the details of session management. However, Curator's behavior can be modified. By default, Curator treats session failures the same way that it treats connection failures: i.e. the current retry policy is checked and, if permitted, operations are retried.
 


[curator-site] 04/05: style: more align code blocks

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/curator-site.git

commit 125608fbeb019e872a188a4bd43a558a8c5aea4f
Author: tison <wa...@gmail.com>
AuthorDate: Tue Aug 15 16:28:41 2023 +0800

    style: more align code blocks
    
    Signed-off-by: tison <wa...@gmail.com>
---
 docs/async-details.md            | 1 -
 docs/recipes-curator-cache.md    | 2 +-
 docs/recipes-path-cache.md       | 2 +-
 docs/recipes-shared-counter.md   | 6 +++---
 docs/recipes-shared-semaphore.md | 2 +-
 docs/service-discovery.md        | 2 +-
 docs/utilities.md                | 2 +-
 7 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/docs/async-details.md b/docs/async-details.md
index 085d9e9..13f037a 100644
--- a/docs/async-details.md
+++ b/docs/async-details.md
@@ -124,7 +124,6 @@ async.create()
                                 .getData()
                                 .forPath(actualPath)
                                 .thenApply(() -> watchTriggered()));
-
 ```
 
 ### AsyncStage canonical usage
diff --git a/docs/recipes-curator-cache.md b/docs/recipes-curator-cache.md
index 2faf2b9..c4255c8 100644
--- a/docs/recipes-curator-cache.md
+++ b/docs/recipes-curator-cache.md
@@ -27,7 +27,7 @@ A utility that attempts to keep the data from a node locally cached. Optionally
 // client - the client
 // path - path to watch
 // options - empty or one or more options
-CuratorCache.build(CuratorFramework client, String path, Options... options);
+CuratorCache build(CuratorFramework client, String path, Options... options);
 ```
 
 There is a builder factory available for additional options when building the cache instance. See `CuratorCacheBuilder` for details.
diff --git a/docs/recipes-path-cache.md b/docs/recipes-path-cache.md
index 074decf..75d55d9 100644
--- a/docs/recipes-path-cache.md
+++ b/docs/recipes-path-cache.md
@@ -17,7 +17,7 @@ A Path Cache is used to watch a ZNode. Whenever a child is added, updated or rem
 
 ## Creating a PathChildrenCache
 
-```
+```java
 // Parameters:
 // client - the client
 // path - path to watch
diff --git a/docs/recipes-shared-counter.md b/docs/recipes-shared-counter.md
index 7bf8f6e..16e5826 100644
--- a/docs/recipes-shared-counter.md
+++ b/docs/recipes-shared-counter.md
@@ -43,17 +43,17 @@ count.close();
 int getCount();
 ```
 
-```
+```java
 // Add a listener for changes to the count
 void addListener(SharedCountListener listener);
 ```
 
-```
+```java
 // Change the shared count value irrespective of its previous state
 public void setCount(int newCount);
 ```
 
-```
+```java
 // Changes the shared count only if its value has not changed since this client last read it. If the count
 // has changed, the value is not set and this client's view of the value is updated. i.e. if the count is
 // not successful you can get the updated value by calling getCount().
diff --git a/docs/recipes-shared-semaphore.md b/docs/recipes-shared-semaphore.md
index b782fcc..347d282 100644
--- a/docs/recipes-shared-semaphore.md
+++ b/docs/recipes-shared-semaphore.md
@@ -52,7 +52,7 @@ To acquire one lease/usage, use one of the acquire methods:
 
 ```java
 // 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.
+// 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.
 public Lease acquire();
 ```
diff --git a/docs/service-discovery.md b/docs/service-discovery.md
index 026cedb..9a655a0 100644
--- a/docs/service-discovery.md
+++ b/docs/service-discovery.md
@@ -40,9 +40,9 @@ ServiceProviders are allocated by using a `ServiceProviderBuilder`. You obtain a
 The ServiceProvider must be started by calling `start()`. When finished you should call `close()`. The only method in ServiceProvider is:
 
 ```java
-public ServiceInstance<T> getInstance() throws Exception;
 // Return an instance for a single use. IMPORTANT: users should not hold on to the instance
 // returned. A fresh instance should always be retrieved.
+public ServiceInstance<T> getInstance() throws Exception;
 ```
 
 :::note
diff --git a/docs/utilities.md b/docs/utilities.md
index 4347e8a..5a5d653 100644
--- a/docs/utilities.md
+++ b/docs/utilities.md
@@ -41,7 +41,7 @@ CuratorFramework client = CuratorFrameworkFactory.builder()
 Curator's Locker uses Java 7's try-with-resources feature to making using Curator locks safer:
 
 ```java
-InterProcessMutex mutex = new InterProcessMutex(...) // or any InterProcessLock
+InterProcessMutex mutex = new InterProcessMutex(...); // or any InterProcessLock
 try (Locker locker = new Locker(mutex, maxTimeout, unit)) {
    // do work
 }


[curator-site] 03/05: style: more align code blocks

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/curator-site.git

commit a6f9d082efd08142bb2ad97f339303e59d1422b2
Author: tison <wa...@gmail.com>
AuthorDate: Tue Aug 15 16:23:56 2023 +0800

    style: more align code blocks
    
    Signed-off-by: tison <wa...@gmail.com>
---
 docs/recipes-shared-reentrant-lock.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/recipes-shared-reentrant-lock.md b/docs/recipes-shared-reentrant-lock.md
index 6322023..7917500 100644
--- a/docs/recipes-shared-reentrant-lock.md
+++ b/docs/recipes-shared-reentrant-lock.md
@@ -26,8 +26,8 @@ public InterProcessMutex(CuratorFramework client, String path);
 To acquire the lock, use one of the acquire methods:
 
 ```java
-Acquire the mutex - blocking until it's available. Note: the same thread can call acquire
-re-entrantly. Each call to acquire must be balanced by a call to release()
+// Acquire the mutex - blocking until it's available. Note: the same thread can call acquire
+// re-entrantly. Each call to acquire must be balanced by a call to release()
 public void acquire();
 ```