|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | +package org.apache.dubbo.config.nested; |
| 18 | + |
| 19 | +import java.io.Serializable; |
| 20 | + |
| 21 | +public class Http3Config implements Serializable { |
| 22 | + |
| 23 | + private static final long serialVersionUID = -4443828713331129834L; |
| 24 | + |
| 25 | + /** |
| 26 | + * Enable http3 support |
| 27 | + * <p>The default value is false. |
| 28 | + */ |
| 29 | + private Boolean enable; |
| 30 | + |
| 31 | + /** |
| 32 | + * See <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_data">set_initial_max_data</a>. |
| 33 | + * <p>The default value is 8MiB. |
| 34 | + */ |
| 35 | + private Integer initialMaxData; |
| 36 | + |
| 37 | + /** |
| 38 | + * If configured this will enable <a href="https://tools.ietf.org/html/draft-ietf-quic-datagram-01">Datagram support.</a> |
| 39 | + */ |
| 40 | + private Integer recvQueueLen; |
| 41 | + |
| 42 | + /** |
| 43 | + * If configured this will enable <a href="https://tools.ietf.org/html/draft-ietf-quic-datagram-01">Datagram support.</a> |
| 44 | + */ |
| 45 | + private Integer sendQueueLen; |
| 46 | + |
| 47 | + /** |
| 48 | + * See |
| 49 | + * <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>. |
| 50 | + * <p>The default value is 1MiB. |
| 51 | + */ |
| 52 | + private Integer initialMaxStreamDataBidiLocal; |
| 53 | + |
| 54 | + /** |
| 55 | + * See |
| 56 | + * <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>. |
| 57 | + * <p>The default value is 1MiB. |
| 58 | + */ |
| 59 | + private Integer initialMaxStreamDataBidiRemote; |
| 60 | + |
| 61 | + /** |
| 62 | + * See |
| 63 | + * <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>. |
| 64 | + * <p>The default value is 0. |
| 65 | + */ |
| 66 | + private Integer initialMaxStreamDataUni; |
| 67 | + |
| 68 | + /** |
| 69 | + * See |
| 70 | + * <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>. |
| 71 | + * <p>The default value is 1B(2^30). |
| 72 | + */ |
| 73 | + private Long initialMaxStreamsBidi; |
| 74 | + |
| 75 | + /** |
| 76 | + * See |
| 77 | + * <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>. |
| 78 | + * <p> |
| 79 | + * <p>The default value is 1B(2^30). |
| 80 | + */ |
| 81 | + private Long initialMaxStreamsUni; |
| 82 | + |
| 83 | + /** |
| 84 | + * See |
| 85 | + * <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_ack_delay_exponent">set_ack_delay_exponent</a>. |
| 86 | + * <p>The default value is 3. |
| 87 | + */ |
| 88 | + private Integer maxAckDelayExponent; |
| 89 | + |
| 90 | + /** |
| 91 | + * See |
| 92 | + * <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_max_ack_delay">set_max_ack_delay</a>. |
| 93 | + * <p>The default value is 25 milliseconds. |
| 94 | + */ |
| 95 | + private Integer maxAckDelay; |
| 96 | + |
| 97 | + /** |
| 98 | + * See |
| 99 | + * <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_disable_active_migration">set_disable_active_migration</a>. |
| 100 | + * <p>The default value is {@code false}. |
| 101 | + */ |
| 102 | + private Boolean disableActiveMigration; |
| 103 | + |
| 104 | + /** |
| 105 | + * See |
| 106 | + * <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.enable_hystart">enable_hystart</a>. |
| 107 | + * <p>The default value is {@code true}. |
| 108 | + */ |
| 109 | + private Boolean enableHystart; |
| 110 | + |
| 111 | + /** |
| 112 | + * Sets the congestion control algorithm to use. |
| 113 | + * <p>Supported algorithms are {@code "RENO"} or {@code "CUBIC"} or {@code "BBR"}. |
| 114 | + * <p>The default value is {@code "CUBIC"}. |
| 115 | + */ |
| 116 | + private String ccAlgorithm; |
| 117 | + |
| 118 | + public Boolean getEnable() { |
| 119 | + return enable; |
| 120 | + } |
| 121 | + |
| 122 | + public void setEnable(Boolean enable) { |
| 123 | + this.enable = enable; |
| 124 | + } |
| 125 | + |
| 126 | + public Integer getInitialMaxData() { |
| 127 | + return initialMaxData; |
| 128 | + } |
| 129 | + |
| 130 | + public void setInitialMaxData(Integer initialMaxData) { |
| 131 | + this.initialMaxData = initialMaxData; |
| 132 | + } |
| 133 | + |
| 134 | + public Integer getRecvQueueLen() { |
| 135 | + return recvQueueLen; |
| 136 | + } |
| 137 | + |
| 138 | + public void setRecvQueueLen(Integer recvQueueLen) { |
| 139 | + this.recvQueueLen = recvQueueLen; |
| 140 | + } |
| 141 | + |
| 142 | + public Integer getSendQueueLen() { |
| 143 | + return sendQueueLen; |
| 144 | + } |
| 145 | + |
| 146 | + public void setSendQueueLen(Integer sendQueueLen) { |
| 147 | + this.sendQueueLen = sendQueueLen; |
| 148 | + } |
| 149 | + |
| 150 | + public Integer getInitialMaxStreamDataBidiLocal() { |
| 151 | + return initialMaxStreamDataBidiLocal; |
| 152 | + } |
| 153 | + |
| 154 | + public void setInitialMaxStreamDataBidiLocal(Integer initialMaxStreamDataBidiLocal) { |
| 155 | + this.initialMaxStreamDataBidiLocal = initialMaxStreamDataBidiLocal; |
| 156 | + } |
| 157 | + |
| 158 | + public Integer getInitialMaxStreamDataBidiRemote() { |
| 159 | + return initialMaxStreamDataBidiRemote; |
| 160 | + } |
| 161 | + |
| 162 | + public void setInitialMaxStreamDataBidiRemote(Integer initialMaxStreamDataBidiRemote) { |
| 163 | + this.initialMaxStreamDataBidiRemote = initialMaxStreamDataBidiRemote; |
| 164 | + } |
| 165 | + |
| 166 | + public Integer getInitialMaxStreamDataUni() { |
| 167 | + return initialMaxStreamDataUni; |
| 168 | + } |
| 169 | + |
| 170 | + public void setInitialMaxStreamDataUni(Integer initialMaxStreamDataUni) { |
| 171 | + this.initialMaxStreamDataUni = initialMaxStreamDataUni; |
| 172 | + } |
| 173 | + |
| 174 | + public Long getInitialMaxStreamsBidi() { |
| 175 | + return initialMaxStreamsBidi; |
| 176 | + } |
| 177 | + |
| 178 | + public void setInitialMaxStreamsBidi(Long initialMaxStreamsBidi) { |
| 179 | + this.initialMaxStreamsBidi = initialMaxStreamsBidi; |
| 180 | + } |
| 181 | + |
| 182 | + public Long getInitialMaxStreamsUni() { |
| 183 | + return initialMaxStreamsUni; |
| 184 | + } |
| 185 | + |
| 186 | + public void setInitialMaxStreamsUni(Long initialMaxStreamsUni) { |
| 187 | + this.initialMaxStreamsUni = initialMaxStreamsUni; |
| 188 | + } |
| 189 | + |
| 190 | + public Integer getMaxAckDelayExponent() { |
| 191 | + return maxAckDelayExponent; |
| 192 | + } |
| 193 | + |
| 194 | + public void setMaxAckDelayExponent(Integer maxAckDelayExponent) { |
| 195 | + this.maxAckDelayExponent = maxAckDelayExponent; |
| 196 | + } |
| 197 | + |
| 198 | + public Integer getMaxAckDelay() { |
| 199 | + return maxAckDelay; |
| 200 | + } |
| 201 | + |
| 202 | + public void setMaxAckDelay(Integer maxAckDelay) { |
| 203 | + this.maxAckDelay = maxAckDelay; |
| 204 | + } |
| 205 | + |
| 206 | + public Boolean getDisableActiveMigration() { |
| 207 | + return disableActiveMigration; |
| 208 | + } |
| 209 | + |
| 210 | + public void setDisableActiveMigration(Boolean disableActiveMigration) { |
| 211 | + this.disableActiveMigration = disableActiveMigration; |
| 212 | + } |
| 213 | + |
| 214 | + public Boolean getEnableHystart() { |
| 215 | + return enableHystart; |
| 216 | + } |
| 217 | + |
| 218 | + public void setEnableHystart(Boolean enableHystart) { |
| 219 | + this.enableHystart = enableHystart; |
| 220 | + } |
| 221 | + |
| 222 | + public String getCcAlgorithm() { |
| 223 | + return ccAlgorithm; |
| 224 | + } |
| 225 | + |
| 226 | + public void setCcAlgorithm(String ccAlgorithm) { |
| 227 | + this.ccAlgorithm = ccAlgorithm; |
| 228 | + } |
| 229 | + |
| 230 | + public void checkDefault() { |
| 231 | + if (initialMaxData == null) { |
| 232 | + initialMaxData = 1 << 23; |
| 233 | + } |
| 234 | + if (initialMaxStreamDataBidiLocal == null) { |
| 235 | + initialMaxStreamDataBidiLocal = 1 << 20; |
| 236 | + } |
| 237 | + if (initialMaxStreamDataBidiRemote == null) { |
| 238 | + initialMaxStreamDataBidiRemote = 1 << 20; |
| 239 | + } |
| 240 | + if (initialMaxStreamDataUni == null) { |
| 241 | + initialMaxStreamDataUni = 1 << 20; |
| 242 | + } |
| 243 | + if (initialMaxStreamsBidi == null) { |
| 244 | + initialMaxStreamsBidi = (long) 1 << 30; |
| 245 | + } |
| 246 | + if (initialMaxStreamsUni == null) { |
| 247 | + initialMaxStreamsUni = (long) 1 << 30; |
| 248 | + } |
| 249 | + } |
| 250 | +} |
0 commit comments