Skip to content

Commit

Permalink
fix qos configuration cannot work after added 'qos-enable' style supp…
Browse files Browse the repository at this point in the history
…ort (apache#4378)

fixes apache#4377
  • Loading branch information
cvictory authored and rolandhe committed Sep 9, 2019
1 parent 0b71b48 commit 6cf9f50
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@
*/
public interface QosConstants {

String QOS_ENABLE = "qos-enable";
String QOS_ENABLE = "qos.enable";

String QOS_PORT = "qos-port";
String QOS_PORT = "qos.port";

String ACCEPT_FOREIGN_IP = "qos-accept-foreign-ip";
String ACCEPT_FOREIGN_IP = "qos.accept.foreign.ip";

String QOS_ENABLE_COMPATIBLE = "qos-enable";

String QOS_PORT_COMPATIBLE = "qos-port";

String ACCEPT_FOREIGN_IP_COMPATIBLE = "qos-accept-foreign-ip";
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
import static org.apache.dubbo.common.constants.CommonConstants.DUMP_DIRECTORY;
import static org.apache.dubbo.common.constants.CommonConstants.SHUTDOWN_WAIT_KEY;
import static org.apache.dubbo.common.constants.QosConstants.ACCEPT_FOREIGN_IP;
import static org.apache.dubbo.common.constants.QosConstants.ACCEPT_FOREIGN_IP_COMPATIBLE;
import static org.apache.dubbo.common.constants.QosConstants.QOS_ENABLE;
import static org.apache.dubbo.common.constants.QosConstants.QOS_ENABLE_COMPATIBLE;
import static org.apache.dubbo.common.constants.QosConstants.QOS_PORT;
import static org.apache.dubbo.common.constants.QosConstants.QOS_PORT_COMPATIBLE;
import static org.apache.dubbo.config.Constants.ARCHITECTURE;
import static org.apache.dubbo.config.Constants.DEVELOPMENT_ENVIRONMENT;
import static org.apache.dubbo.config.Constants.ENVIRONMENT;
Expand Down Expand Up @@ -317,36 +320,34 @@ public void setQosAcceptForeignIp(Boolean qosAcceptForeignIp) {
this.qosAcceptForeignIp = qosAcceptForeignIp;
}

@Deprecated
@Parameter(key = "qos.enable", excluded = true)
public Boolean getQosEnableDeprecated() {
/**
* The format is the same as the springboot, including: getQosEnableCompatible(), getQosPortCompatible(), getQosAcceptForeignIpCompatible().
* @return
*/
@Parameter(key = QOS_ENABLE_COMPATIBLE, excluded = true)
public Boolean getQosEnableCompatible() {
return getQosEnable();
}

@Deprecated
public void setQosEnableDeprecated(Boolean qosEnable) {
public void setQosEnableCompatible(Boolean qosEnable) {
setQosEnable(qosEnable);
}

@Deprecated
@Parameter(key = "qos.port", excluded = true)
public Integer getQosPortDeprecated() {
@Parameter(key = QOS_PORT_COMPATIBLE, excluded = true)
public Integer getQosPortCompatible() {
return getQosPort();
}

@Deprecated
public void setQosPortDeprecated(Integer qosPort) {
public void setQosPortCompatible(Integer qosPort) {
this.setQosPort(qosPort);
}

@Deprecated
@Parameter(key = "qos.accept.foreign.ip", excluded = true)
public Boolean getQosAcceptForeignIpDeprecated() {
@Parameter(key = ACCEPT_FOREIGN_IP_COMPATIBLE, excluded = true)
public Boolean getQosAcceptForeignIpCompatible() {
return this.getQosAcceptForeignIp();
}

@Deprecated
public void setQosAcceptForeignIpDeprecated(Boolean qosAcceptForeignIp) {
public void setQosAcceptForeignIpCompatible(Boolean qosAcceptForeignIp) {
this.setQosAcceptForeignIp(qosAcceptForeignIp);
}

Expand Down

0 comments on commit 6cf9f50

Please sign in to comment.