Skip to content

Commit

Permalink
Rest config refine
Browse files Browse the repository at this point in the history
  • Loading branch information
oxsean committed Jun 18, 2024
1 parent a276ab0 commit 679f0fc
Show file tree
Hide file tree
Showing 28 changed files with 696 additions and 484 deletions.
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

0 comments on commit 679f0fc

Please sign in to comment.