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

fix qos configuration cannot work. #4377 #4378

Merged
merged 1 commit into from
Jun 25, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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