From 808af3e6bddcae225b07dc2547e4e8024feae912 Mon Sep 17 00:00:00 2001 From: Joshua Yam <90635461+josh-pinwheelapi@users.noreply.github.com> Date: Fri, 17 May 2024 13:30:43 -0400 Subject: [PATCH] Update Custom Node Initialization in Grid Advanced Features (#1729) * Update Code Sample * Fix identation * Fix constructor * Fix typo * Fix identation --------- Co-authored-by: Diego Molina [deploy site] --- .../grid/advanced_features/customize_node.en.md | 13 ++++++++----- .../grid/advanced_features/customize_node.ja.md | 13 ++++++++----- .../grid/advanced_features/customize_node.pt-br.md | 13 ++++++++----- .../grid/advanced_features/customize_node.zh-cn.md | 13 ++++++++----- 4 files changed, 32 insertions(+), 20 deletions(-) diff --git a/website_and_docs/content/documentation/grid/advanced_features/customize_node.en.md b/website_and_docs/content/documentation/grid/advanced_features/customize_node.en.md index 42c4ce166814..f73e5c9dbee5 100644 --- a/website_and_docs/content/documentation/grid/advanced_features/customize_node.en.md +++ b/website_and_docs/content/documentation/grid/advanced_features/customize_node.en.md @@ -95,8 +95,8 @@ public class DecoratedLoggingNode extends Node { private Node node; - protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret) { - super(tracer, nodeId, uri, registrationSecret); + protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret, Duration sessionTimeout) { + super(tracer, nodeId, uri, registrationSecret, sessionTimeout); } public static Node create(Config config) { @@ -104,14 +104,17 @@ public class DecoratedLoggingNode extends Node { BaseServerOptions serverOptions = new BaseServerOptions(config); URI uri = serverOptions.getExternalUri(); SecretOptions secretOptions = new SecretOptions(config); + NodeOptions nodeOptions = new NodeOptions(config); + Duration sessionTimeout = nodeOptions.getSessionTimeout(); // Refer to the foot notes for additional context on this line. Node node = LocalNodeFactory.create(config); DecoratedLoggingNode wrapper = new DecoratedLoggingNode(loggingOptions.getTracer(), - node.getId(), - uri, - secretOptions.getRegistrationSecret()); + node.getId(), + uri, + secretOptions.getRegistrationSecret(), + sessionTimeout); wrapper.node = node; return wrapper; } diff --git a/website_and_docs/content/documentation/grid/advanced_features/customize_node.ja.md b/website_and_docs/content/documentation/grid/advanced_features/customize_node.ja.md index 15e481ac6d02..c6a19435cf13 100644 --- a/website_and_docs/content/documentation/grid/advanced_features/customize_node.ja.md +++ b/website_and_docs/content/documentation/grid/advanced_features/customize_node.ja.md @@ -100,8 +100,8 @@ public class DecoratedLoggingNode extends Node { private Node node; - protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret) { - super(tracer, nodeId, uri, registrationSecret); + protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret, Duration sessionTimeout) { + super(tracer, nodeId, uri, registrationSecret, sessionTimeout); } public static Node create(Config config) { @@ -109,14 +109,17 @@ public class DecoratedLoggingNode extends Node { BaseServerOptions serverOptions = new BaseServerOptions(config); URI uri = serverOptions.getExternalUri(); SecretOptions secretOptions = new SecretOptions(config); + NodeOptions nodeOptions = new NodeOptions(config); + Duration sessionTimeout = nodeOptions.getSessionTimeout(); // Refer to the foot notes for additional context on this line. Node node = LocalNodeFactory.create(config); DecoratedLoggingNode wrapper = new DecoratedLoggingNode(loggingOptions.getTracer(), - node.getId(), - uri, - secretOptions.getRegistrationSecret()); + node.getId(), + uri, + secretOptions.getRegistrationSecret(), + sessionTimeout); wrapper.node = node; return wrapper; } diff --git a/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md b/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md index 6ae406228ba0..ea10a4bf899e 100644 --- a/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md +++ b/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md @@ -90,8 +90,8 @@ public class DecoratedLoggingNode extends Node { private Node node; - protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret) { - super(tracer, nodeId, uri, registrationSecret); + protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret, Duration sessionTimeout) { + super(tracer, nodeId, uri, registrationSecret, sessionTimeout); } public static Node create(Config config) { @@ -99,14 +99,17 @@ public class DecoratedLoggingNode extends Node { BaseServerOptions serverOptions = new BaseServerOptions(config); URI uri = serverOptions.getExternalUri(); SecretOptions secretOptions = new SecretOptions(config); + NodeOptions nodeOptions = new NodeOptions(config); + Duration sessionTimeout = nodeOptions.getSessionTimeout(); // Refer to the foot notes for additional context on this line. Node node = LocalNodeFactory.create(config); DecoratedLoggingNode wrapper = new DecoratedLoggingNode(loggingOptions.getTracer(), - node.getId(), - uri, - secretOptions.getRegistrationSecret()); + node.getId(), + uri, + secretOptions.getRegistrationSecret(), + sessionTimeout); wrapper.node = node; return wrapper; } diff --git a/website_and_docs/content/documentation/grid/advanced_features/customize_node.zh-cn.md b/website_and_docs/content/documentation/grid/advanced_features/customize_node.zh-cn.md index b9cf3d942989..87d624ff1e61 100644 --- a/website_and_docs/content/documentation/grid/advanced_features/customize_node.zh-cn.md +++ b/website_and_docs/content/documentation/grid/advanced_features/customize_node.zh-cn.md @@ -100,8 +100,8 @@ public class DecoratedLoggingNode extends Node { private Node node; - protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret) { - super(tracer, nodeId, uri, registrationSecret); + protected DecoratedLoggingNode(Tracer tracer, NodeId nodeId, URI uri, Secret registrationSecret, Duration sessionTimeout) { + super(tracer, nodeId, uri, registrationSecret, sessionTimeout); } public static Node create(Config config) { @@ -109,14 +109,17 @@ public class DecoratedLoggingNode extends Node { BaseServerOptions serverOptions = new BaseServerOptions(config); URI uri = serverOptions.getExternalUri(); SecretOptions secretOptions = new SecretOptions(config); + NodeOptions nodeOptions = new NodeOptions(config); + Duration sessionTimeout = nodeOptions.getSessionTimeout(); // Refer to the foot notes for additional context on this line. Node node = LocalNodeFactory.create(config); DecoratedLoggingNode wrapper = new DecoratedLoggingNode(loggingOptions.getTracer(), - node.getId(), - uri, - secretOptions.getRegistrationSecret()); + node.getId(), + uri, + secretOptions.getRegistrationSecret(), + sessionTimeout); wrapper.node = node; return wrapper; }