dubbo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yizhenqi...@apache.org
Subject [dubbo] branch master updated: fix https://github.com/apache/dubbo/issues/6708 alive add (#6786)
Date Sat, 10 Oct 2020 06:08:31 GMT
This is an automated email from the ASF dual-hosted git repository.

yizhenqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 099fc5d  fix https://github.com/apache/dubbo/issues/6708 alive add (#6786)
099fc5d is described below

commit 099fc5d823419548db135f1a5274ae53bf58a0d9
Author: yizhenqiang <manzhizhen@163.com>
AuthorDate: Sat Oct 10 14:07:40 2020 +0800

    fix https://github.com/apache/dubbo/issues/6708 alive add (#6786)
---
 .../org/apache/dubbo/config/ProtocolConfig.java    | 55 ++++++++++++++++++++++
 .../org/apache/dubbo/config/ProviderConfig.java    | 44 +++++++++++++++++
 .../src/main/resources/META-INF/compat/dubbo.xsd   | 10 ++++
 .../src/main/resources/META-INF/dubbo.xsd          | 10 ++++
 4 files changed, 119 insertions(+)

diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/ProtocolConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/ProtocolConfig.java
index 25cca82..d61ab2a 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/ProtocolConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ProtocolConfig.java
@@ -80,6 +80,11 @@ public class ProtocolConfig extends AbstractConfig {
     private Integer iothreads;
 
     /**
+     * Thread pool keepAliveTime, default unit TimeUnit.MILLISECONDS
+     */
+    private Integer alive;
+
+    /**
      * Thread pool's queue length
      */
     private Integer queues;
@@ -300,6 +305,14 @@ public class ProtocolConfig extends AbstractConfig {
         this.iothreads = iothreads;
     }
 
+    public Integer getAlive() {
+        return alive;
+    }
+
+    public void setAlive(Integer alive) {
+        this.alive = alive;
+    }
+
     public Integer getQueues() {
         return queues;
     }
@@ -540,4 +553,46 @@ public class ProtocolConfig extends AbstractConfig {
     public boolean isValid() {
         return StringUtils.isNotEmpty(name);
     }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("ProtocolConfig{");
+        sb.append("name='").append(name).append('\'');
+        sb.append(", host='").append(host).append('\'');
+        sb.append(", port=").append(port);
+        sb.append(", contextpath='").append(contextpath).append('\'');
+        sb.append(", threadpool='").append(threadpool).append('\'');
+        sb.append(", threadname='").append(threadname).append('\'');
+        sb.append(", corethreads=").append(corethreads);
+        sb.append(", threads=").append(threads);
+        sb.append(", iothreads=").append(iothreads);
+        sb.append(", alive=").append(alive);
+        sb.append(", queues=").append(queues);
+        sb.append(", accepts=").append(accepts);
+        sb.append(", codec='").append(codec).append('\'');
+        sb.append(", serialization='").append(serialization).append('\'');
+        sb.append(", charset='").append(charset).append('\'');
+        sb.append(", payload=").append(payload);
+        sb.append(", buffer=").append(buffer);
+        sb.append(", heartbeat=").append(heartbeat);
+        sb.append(", accesslog='").append(accesslog).append('\'');
+        sb.append(", transporter='").append(transporter).append('\'');
+        sb.append(", exchanger='").append(exchanger).append('\'');
+        sb.append(", dispatcher='").append(dispatcher).append('\'');
+        sb.append(", networker='").append(networker).append('\'');
+        sb.append(", server='").append(server).append('\'');
+        sb.append(", client='").append(client).append('\'');
+        sb.append(", telnet='").append(telnet).append('\'');
+        sb.append(", prompt='").append(prompt).append('\'');
+        sb.append(", status='").append(status).append('\'');
+        sb.append(", register=").append(register);
+        sb.append(", keepAlive=").append(keepAlive);
+        sb.append(", optimizer='").append(optimizer).append('\'');
+        sb.append(", extension='").append(extension).append('\'');
+        sb.append(", parameters=").append(parameters);
+        sb.append(", isDefault=").append(isDefault);
+        sb.append(", sslEnabled=").append(sslEnabled);
+        sb.append('}');
+        return sb.toString();
+    }
 }
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/ProviderConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/ProviderConfig.java
index 7b38a75..ad948f1 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/ProviderConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ProviderConfig.java
@@ -70,6 +70,11 @@ public class ProviderConfig extends AbstractServiceConfig {
     private Integer iothreads;
 
     /**
+     * Thread pool keepAliveTime, default unit TimeUnit.MILLISECONDS
+     */
+    private Integer alive;
+
+    /**
      * Thread pool queue length
      */
     private Integer queues;
@@ -240,6 +245,14 @@ public class ProviderConfig extends AbstractServiceConfig {
         this.iothreads = iothreads;
     }
 
+    public Integer getAlive() {
+        return alive;
+    }
+
+    public void setAlive(Integer alive) {
+        this.alive = alive;
+    }
+
     public Integer getQueues() {
         return queues;
     }
@@ -425,4 +438,35 @@ public class ProviderConfig extends AbstractServiceConfig {
         this.wait = wait;
     }
 
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("ProviderConfig{");
+        sb.append("host='").append(host).append('\'');
+        sb.append(", port=").append(port);
+        sb.append(", contextpath='").append(contextpath).append('\'');
+        sb.append(", threadpool='").append(threadpool).append('\'');
+        sb.append(", threadname='").append(threadname).append('\'');
+        sb.append(", threads=").append(threads);
+        sb.append(", iothreads=").append(iothreads);
+        sb.append(", alive=").append(alive);
+        sb.append(", queues=").append(queues);
+        sb.append(", accepts=").append(accepts);
+        sb.append(", codec='").append(codec).append('\'');
+        sb.append(", charset='").append(charset).append('\'');
+        sb.append(", payload=").append(payload);
+        sb.append(", buffer=").append(buffer);
+        sb.append(", transporter='").append(transporter).append('\'');
+        sb.append(", exchanger='").append(exchanger).append('\'');
+        sb.append(", dispatcher='").append(dispatcher).append('\'');
+        sb.append(", networker='").append(networker).append('\'');
+        sb.append(", server='").append(server).append('\'');
+        sb.append(", client='").append(client).append('\'');
+        sb.append(", telnet='").append(telnet).append('\'');
+        sb.append(", prompt='").append(prompt).append('\'');
+        sb.append(", status='").append(status).append('\'');
+        sb.append(", wait=").append(wait);
+        sb.append(", isDefault=").append(isDefault);
+        sb.append('}');
+        return sb.toString();
+    }
 }
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
index ab229eb..8e5c6d3 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
@@ -1070,6 +1070,11 @@
                 <xsd:documentation><![CDATA[ The IO thread pool size. ]]></xsd:documentation>
             </xsd:annotation>
         </xsd:attribute>
+        <xsd:attribute name="alive" type="xsd:string">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The thread pool keepAliveTime. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
         <xsd:attribute name="queues" type="xsd:string">
             <xsd:annotation>
                 <xsd:documentation><![CDATA[ The thread pool queue size. ]]></xsd:documentation>
@@ -1246,6 +1251,11 @@
                         <xsd:documentation><![CDATA[ The IO thread pool size. ]]></xsd:documentation>
                     </xsd:annotation>
                 </xsd:attribute>
+                <xsd:attribute name="alive" type="xsd:string">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool keepAliveTime.
]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
                 <xsd:attribute name="queues" type="xsd:string">
                     <xsd:annotation>
                         <xsd:documentation><![CDATA[ The thread pool queue size.
]]></xsd:documentation>
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
index a79ebb4..339962d 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
@@ -1081,6 +1081,11 @@
                 <xsd:documentation><![CDATA[ The IO thread pool size. ]]></xsd:documentation>
             </xsd:annotation>
         </xsd:attribute>
+        <xsd:attribute name="alive" type="xsd:string">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The thread pool keepAliveTime. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
         <xsd:attribute name="queues" type="xsd:string">
             <xsd:annotation>
                 <xsd:documentation><![CDATA[ The thread pool queue size. ]]></xsd:documentation>
@@ -1257,6 +1262,11 @@
                         <xsd:documentation><![CDATA[ The IO thread pool size. ]]></xsd:documentation>
                     </xsd:annotation>
                 </xsd:attribute>
+                <xsd:attribute name="alive" type="xsd:string">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool keepAliveTime.
]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
                 <xsd:attribute name="queues" type="xsd:string">
                     <xsd:annotation>
                         <xsd:documentation><![CDATA[ The thread pool queue size.
]]></xsd:documentation>


Mime
View raw message