From c297332ea9a688e451372d7f60adc1f4f758f759 Mon Sep 17 00:00:00 2001 From: conghuhu Date: Sun, 4 Jun 2023 22:29:02 +0800 Subject: [PATCH] fix: fix license --- .../dubbo/config/nested/BaggageConfig.java | 25 +++++++++++++++ .../dubbo/config/nested/ExporterConfig.java | 31 +++++++++++++++++++ .../config/nested/PropagationConfig.java | 7 +++++ .../dubbo/config/nested/SamplingConfig.java | 7 +++++ .../internal}/org.apache.dubbo.rpc.Filter | 0 5 files changed, 70 insertions(+) rename dubbo-metrics/dubbo-tracing/src/main/resources/{META-INF.dubbo.internal => META-INF/dubbo/internal}/org.apache.dubbo.rpc.Filter (100%) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/BaggageConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/BaggageConfig.java index beba9b5ddd24..b39f0ece30d0 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/BaggageConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/BaggageConfig.java @@ -39,6 +39,19 @@ public class BaggageConfig implements Serializable { */ private List remoteFields = new ArrayList<>(); + public BaggageConfig() { + } + + public BaggageConfig(Boolean enabled) { + this.enabled = enabled; + } + + public BaggageConfig(Boolean enabled, Correlation correlation, List remoteFields) { + this.enabled = enabled; + this.correlation = correlation; + this.remoteFields = remoteFields; + } + public Boolean getEnabled() { return enabled; } @@ -76,6 +89,18 @@ public static class Correlation implements Serializable { */ private List fields = new ArrayList<>(); + public Correlation() { + } + + public Correlation(boolean enabled) { + this.enabled = enabled; + } + + public Correlation(boolean enabled, List fields) { + this.enabled = enabled; + this.fields = fields; + } + public boolean isEnabled() { return this.enabled; } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/ExporterConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/ExporterConfig.java index 39bff370842d..60116efb3325 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/ExporterConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/ExporterConfig.java @@ -64,6 +64,19 @@ public static class ZipkinConfig implements Serializable { */ private Integer readTimeout = 10; + public ZipkinConfig() { + } + + public ZipkinConfig(String endpoint) { + this.endpoint = endpoint; + } + + public ZipkinConfig(String endpoint, Integer connectTimeout, Integer readTimeout) { + this.endpoint = endpoint; + this.connectTimeout = connectTimeout; + this.readTimeout = readTimeout; + } + public String getEndpoint() { return endpoint; } @@ -109,6 +122,24 @@ public static class OtlpConfig implements Serializable { private Map headers = new HashMap<>(); + public OtlpConfig() { + } + + public OtlpConfig(String endpoint) { + this.endpoint = endpoint; + } + + public OtlpConfig(String endpoint, Integer timeout) { + this.endpoint = endpoint; + this.timeout = timeout; + } + + public OtlpConfig(String endpoint, Integer timeout, String compressionMethod) { + this.endpoint = endpoint; + this.timeout = timeout; + this.compressionMethod = compressionMethod; + } + public String getEndpoint() { return endpoint; } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/PropagationConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/PropagationConfig.java index 8e523533239e..c574bd0e6d5c 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/PropagationConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/PropagationConfig.java @@ -29,6 +29,13 @@ public class PropagationConfig implements Serializable { */ private String type = W3C; + public PropagationConfig() { + } + + public PropagationConfig(String type) { + this.type = type; + } + public String getType() { return type; } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/SamplingConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/SamplingConfig.java index a605527190ca..0e98a98b5f53 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/nested/SamplingConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/nested/SamplingConfig.java @@ -25,6 +25,13 @@ public class SamplingConfig implements Serializable { */ private float probability = 0.10f; + public SamplingConfig() { + } + + public SamplingConfig(float probability) { + this.probability = probability; + } + public float getProbability() { return this.probability; } diff --git a/dubbo-metrics/dubbo-tracing/src/main/resources/META-INF.dubbo.internal/org.apache.dubbo.rpc.Filter b/dubbo-metrics/dubbo-tracing/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter similarity index 100% rename from dubbo-metrics/dubbo-tracing/src/main/resources/META-INF.dubbo.internal/org.apache.dubbo.rpc.Filter rename to dubbo-metrics/dubbo-tracing/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter