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

[issue-303]add the tag corethreads to the complex tag <dubbo:protocol> in dubbo.xsd #1989

Merged
merged 9 commits into from
Jul 18, 2018
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