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 2022/06/26 12:45:58 UTC
[curator] 02/02: CURATOR-643: Replace literal boolean with named constant
This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/curator.git
commit 0a76a61f112e960c330a3365457776621bb430cc
Author: tison <wa...@gmail.com>
AuthorDate: Sun Jun 26 20:45:47 2022 +0800
CURATOR-643: Replace literal boolean with named constant
Signed-off-by: tison <wa...@gmail.com>
---
.../apache/curator/framework/recipes/nodes/PersistentTtlNode.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentTtlNode.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentTtlNode.java
index c8d2562e..6a0f15b6 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentTtlNode.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentTtlNode.java
@@ -58,6 +58,7 @@ public class PersistentTtlNode implements Closeable
{
public static final String DEFAULT_CHILD_NODE_NAME = "touch";
public static final int DEFAULT_TOUCH_SCHEDULE_FACTOR = 2;
+ public static final boolean DEFAULT_USE_PARENT_CREATION = true;
private final Logger log = LoggerFactory.getLogger(getClass());
private final PersistentNode node;
@@ -76,7 +77,7 @@ public class PersistentTtlNode implements Closeable
*/
public PersistentTtlNode(CuratorFramework client, String path, long ttlMs, byte[] initData)
{
- this(client, Executors.newSingleThreadScheduledExecutor(ThreadUtils.newThreadFactory("PersistentTtlNode")), path, ttlMs, initData, DEFAULT_CHILD_NODE_NAME, DEFAULT_TOUCH_SCHEDULE_FACTOR, true);
+ this(client, Executors.newSingleThreadScheduledExecutor(ThreadUtils.newThreadFactory("PersistentTtlNode")), path, ttlMs, initData, DEFAULT_CHILD_NODE_NAME, DEFAULT_TOUCH_SCHEDULE_FACTOR, DEFAULT_USE_PARENT_CREATION);
}
/**
@@ -103,7 +104,7 @@ public class PersistentTtlNode implements Closeable
*/
public PersistentTtlNode(CuratorFramework client, ScheduledExecutorService executorService, String path, long ttlMs, byte[] initData, String childNodeName, int touchScheduleFactor)
{
- this(client, executorService, path, ttlMs, initData, childNodeName, touchScheduleFactor, true);
+ this(client, executorService, path, ttlMs, initData, childNodeName, touchScheduleFactor, DEFAULT_USE_PARENT_CREATION);
}
/**