Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest Refine #14334

Merged
merged 16 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,5 @@ dubbo-tracing
dubbo-xds
dubbo-plugin-loom
dubbo-rest-jaxrs
dubbo-rest-servlet
dubbo-rest-spring
dubbo-triple-servlet
22 changes: 18 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,40 @@ ij_java_keep_simple_lambdas_in_one_line = true
ij_java_keep_simple_methods_in_one_line = true
ij_java_keep_blank_lines_in_code = 1
ij_java_keep_blank_lines_in_declarations = 1
ij_java_blank_lines_after_class_header = 1
ij_java_class_count_to_use_import_on_demand = 999
ij_java_names_count_to_use_import_on_demand = 999
ij_java_imports_layout = org.apache.dubbo.**, |, javax.**, |, java.**, |, *, |, $*
ij_java_insert_inner_class_imports = true
ij_java_space_before_array_initializer_left_brace = true
ij_java_method_parameters_new_line_after_left_paren = true
ij_java_wrap_comments = true
ij_java_wrap_long_lines = true
ij_java_wrap_comments = false
ij_java_wrap_long_lines = false
ij_java_enum_constants_wrap = split_into_lines
ij_java_method_call_chain_wrap = split_into_lines
ij_java_method_call_chain_wrap = on_every_item
ij_java_method_parameters_wrap = on_every_item
ij_java_extends_list_wrap = on_every_item
ij_java_extends_list_wrap = normal
ij_java_extends_keyword_wrap = normal
ij_java_binary_operation_wrap = normal
ij_java_binary_operation_sign_on_next_line = true

[*.groovy]
max_line_length = 180
ij_groovy_label_indent_size = 4
ij_groovy_keep_blank_lines_in_code = 1
ij_groovy_keep_blank_lines_in_declarations = 1
ij_groovy_blank_lines_after_class_header = 1
ij_groovy_class_count_to_use_import_on_demand = 999
ij_groovy_names_count_to_use_import_on_demand = 999
ij_groovy_imports_layout = org.apache.dubbo.**, |, javax.**, |, java.**, |, *, |, $*
ij_groovy_space_after_type_cast = false

[*.json]
tab_width = 2
indent_size = 2

[*.{yml,yaml}]
tab_width = 2
indent_size = 2

[*.xml]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ jobs:
cd test && bash ./build-test-image.sh
- name: "Run tests"
run: cd test && bash ./run-tests.sh
- name: "merge jacoco resule"
- name: "merge jacoco result"
run: |
cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoMerge" -Dexec.args="${{github.workspace}}"
- name: "Upload jacoco"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public class SystemPropertyConfigUtils {
for (Field field : fields) {
try {
assert systemProperties != null;
systemProperties.add((String) field.get(null));
Object value = field.get(null);
if (value instanceof String) {
systemProperties.add((String) value);
}
} catch (IllegalAccessException e) {
throw new IllegalStateException(
String.format("%s does not have field of %s", clazz.getName(), field.getName()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
public class AggregationConfig implements Serializable {

private static final long serialVersionUID = 4878693820314125085L;

/**
* Enable aggregation or not.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
*/
public class BaggageConfig implements Serializable {

private static final long serialVersionUID = -4750259290735346439L;

/**
* Whether baggage is enabled or not.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.config;
package org.apache.dubbo.config.nested;

import java.io.Serializable;

public class CorsConfig implements Serializable {
private static final long serialVersionUID = 1L;

private static final long serialVersionUID = -7106481576053641726L;

/**
* A list of origins for which cross-origin requests are allowed. Values may be a specific domain, e.g.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
*/
public class ExporterConfig implements Serializable {

private static final long serialVersionUID = -559392305178067845L;

/**
* Configuration for the Zipkin.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
public class HistogramConfig implements Serializable {

private static final long serialVersionUID = 8152538916051803031L;

/**
* Whether histograms are enabled or not. Default is not enabled (false).
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.config.nested;

import java.io.Serializable;

public class Http3Config implements Serializable {

private static final long serialVersionUID = -4443828713331129834L;

/**
* Enable http3 support
* <p>The default value is false.
*/
private Boolean enable;

/**
* See <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_data">set_initial_max_data</a>.
* <p>The default value is 8MiB.
*/
private Integer initialMaxData;

/**
* If configured this will enable <a href="https://tools.ietf.org/html/draft-ietf-quic-datagram-01">Datagram support.</a>
*/
private Integer recvQueueLen;

/**
* If configured this will enable <a href="https://tools.ietf.org/html/draft-ietf-quic-datagram-01">Datagram support.</a>
*/
private Integer sendQueueLen;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_stream_data_bidi_local">set_initial_max_stream_data_bidi_local</a>.
* <p>The default value is 1MiB.
*/
private Integer initialMaxStreamDataBidiLocal;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_stream_data_bidi_remote">set_initial_max_stream_data_bidi_remote</a>.
* <p>The default value is 1MiB.
*/
private Integer initialMaxStreamDataBidiRemote;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_stream_data_uni">set_initial_max_stream_data_uni</a>.
* <p>The default value is 0.
*/
private Integer initialMaxStreamDataUni;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_streams_bidi">set_initial_max_streams_bidi</a>.
* <p>The default value is 1B(2^30).
*/
private Long initialMaxStreamsBidi;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_streams_uni">set_initial_max_streams_uni</a>.
* <p>
* <p>The default value is 1B(2^30).
*/
private Long initialMaxStreamsUni;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_ack_delay_exponent">set_ack_delay_exponent</a>.
* <p>The default value is 3.
*/
private Integer maxAckDelayExponent;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_max_ack_delay">set_max_ack_delay</a>.
* <p>The default value is 25 milliseconds.
*/
private Integer maxAckDelay;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_disable_active_migration">set_disable_active_migration</a>.
* <p>The default value is {@code false}.
*/
private Boolean disableActiveMigration;

/**
* See
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.enable_hystart">enable_hystart</a>.
* <p>The default value is {@code true}.
*/
private Boolean enableHystart;

/**
* Sets the congestion control algorithm to use.
* <p>Supported algorithms are {@code "RENO"} or {@code "CUBIC"} or {@code "BBR"}.
* <p>The default value is {@code "CUBIC"}.
*/
private String ccAlgorithm;

public Boolean getEnable() {
return enable;
}

public void setEnable(Boolean enable) {
this.enable = enable;
}

public Integer getInitialMaxData() {
return initialMaxData;
}

public void setInitialMaxData(Integer initialMaxData) {
this.initialMaxData = initialMaxData;
}

public Integer getRecvQueueLen() {
return recvQueueLen;
}

public void setRecvQueueLen(Integer recvQueueLen) {
this.recvQueueLen = recvQueueLen;
}

public Integer getSendQueueLen() {
return sendQueueLen;
}

public void setSendQueueLen(Integer sendQueueLen) {
this.sendQueueLen = sendQueueLen;
}

public Integer getInitialMaxStreamDataBidiLocal() {
return initialMaxStreamDataBidiLocal;
}

public void setInitialMaxStreamDataBidiLocal(Integer initialMaxStreamDataBidiLocal) {
this.initialMaxStreamDataBidiLocal = initialMaxStreamDataBidiLocal;
}

public Integer getInitialMaxStreamDataBidiRemote() {
return initialMaxStreamDataBidiRemote;
}

public void setInitialMaxStreamDataBidiRemote(Integer initialMaxStreamDataBidiRemote) {
this.initialMaxStreamDataBidiRemote = initialMaxStreamDataBidiRemote;
}

public Integer getInitialMaxStreamDataUni() {
return initialMaxStreamDataUni;
}

public void setInitialMaxStreamDataUni(Integer initialMaxStreamDataUni) {
this.initialMaxStreamDataUni = initialMaxStreamDataUni;
}

public Long getInitialMaxStreamsBidi() {
return initialMaxStreamsBidi;
}

public void setInitialMaxStreamsBidi(Long initialMaxStreamsBidi) {
this.initialMaxStreamsBidi = initialMaxStreamsBidi;
}

public Long getInitialMaxStreamsUni() {
return initialMaxStreamsUni;
}

public void setInitialMaxStreamsUni(Long initialMaxStreamsUni) {
this.initialMaxStreamsUni = initialMaxStreamsUni;
}

public Integer getMaxAckDelayExponent() {
return maxAckDelayExponent;
}

public void setMaxAckDelayExponent(Integer maxAckDelayExponent) {
this.maxAckDelayExponent = maxAckDelayExponent;
}

public Integer getMaxAckDelay() {
return maxAckDelay;
}

public void setMaxAckDelay(Integer maxAckDelay) {
this.maxAckDelay = maxAckDelay;
}

public Boolean getDisableActiveMigration() {
return disableActiveMigration;
}

public void setDisableActiveMigration(Boolean disableActiveMigration) {
this.disableActiveMigration = disableActiveMigration;
}

public Boolean getEnableHystart() {
return enableHystart;
}

public void setEnableHystart(Boolean enableHystart) {
this.enableHystart = enableHystart;
}

public String getCcAlgorithm() {
return ccAlgorithm;
}

public void setCcAlgorithm(String ccAlgorithm) {
this.ccAlgorithm = ccAlgorithm;
}

public void checkDefault() {
if (initialMaxData == null) {
initialMaxData = 1 << 23;
}
if (initialMaxStreamDataBidiLocal == null) {
initialMaxStreamDataBidiLocal = 1 << 20;
}
if (initialMaxStreamDataBidiRemote == null) {
initialMaxStreamDataBidiRemote = 1 << 20;
}
if (initialMaxStreamDataUni == null) {
initialMaxStreamDataUni = 1 << 20;
}
if (initialMaxStreamsBidi == null) {
initialMaxStreamsBidi = (long) 1 << 30;
}
if (initialMaxStreamsUni == null) {
initialMaxStreamsUni = (long) 1 << 30;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*/
public class PrometheusConfig implements Serializable {

private static final long serialVersionUID = 2238807632335823129L;

/**
* Prometheus exporter configuration
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
public class PropagationConfig implements Serializable {

private static final long serialVersionUID = -2570106396211532046L;

public static final String B3 = "B3";

public static final String W3C = "W3C";
Expand Down
Loading
Loading