diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java index c2e4210181f..3ae33291adc 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java @@ -54,6 +54,9 @@ public class ProtocolConfig extends AbstractConfig { // thread pool private String threadpool; + // thread pool core thread size + private Integer corethreads; + // thread pool size (fixed size) private Integer threads; @@ -207,6 +210,14 @@ public void setThreadpool(String threadpool) { this.threadpool = threadpool; } + public Integer getCorethreads() { + return corethreads; + } + + public void setCorethreads(Integer corethreads) { + this.corethreads = corethreads; + } + public Integer getThreads() { return threads; } diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java index 754525629e1..04c5a4315a4 100644 --- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java +++ b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java @@ -88,6 +88,13 @@ public void testPath() throws Exception { assertThat(protocol.getContextpath(), equalTo("path")); } + @Test + public void testCorethreads() throws Exception { + ProtocolConfig protocol = new ProtocolConfig(); + protocol.setCorethreads(10); + assertThat(protocol.getCorethreads(), is(10)); + } + @Test public void testThreads() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); 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 a2cd6b99310..42132282212 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 @@ -789,6 +789,11 @@ + + + + +