Skip to content

Commit

Permalink
[Issue-303] Add the tag corethreads to <dubbo:protocol> in dubbo.xsd (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tswstarplanet authored and ralf0131 committed Jul 18, 2018
1 parent 0513b06 commit 588214b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,11 @@
<xsd:documentation><![CDATA[ The thread pool size. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="corethreads" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[ The thread pool core threads size. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="iothreads" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[ The IO thread pool size. ]]></xsd:documentation>
Expand Down

0 comments on commit 588214b

Please sign in to comment.