Skip to content

Commit

Permalink
Merge pull request apache#2360, add xml configuration for graceful sh…
Browse files Browse the repository at this point in the history
…utdown on ApplicationConfig level.
  • Loading branch information
jinzeyu0 authored and zzzzhougit committed Sep 9, 2018
1 parent f3fcbda commit 216e0db
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public class ApplicationConfig extends AbstractConfig {
// customized parameters
private Map<String, String> parameters;

//config the shutdown.wait
private String shutwait;


public ApplicationConfig() {
}

Expand Down Expand Up @@ -296,4 +300,13 @@ public void setParameters(Map<String, String> parameters) {
checkParameterName(parameters);
this.parameters = parameters;
}

public String getShutwait() {
return shutwait;
}

public void setShutwait(String shutwait) {
System.setProperty( Constants.SHUTDOWN_WAIT_KEY, shutwait);
this.shutwait = shutwait;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,17 @@
<xsd:documentation><![CDATA[ The application monitor. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="shutwait" type="xsd:string" >
<xsd:annotation>
<xsd:documentation><![CDATA[ The application shutDown-wait time. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="default" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[ Is default. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>

</xsd:complexType>

<xsd:complexType name="moduleType">
Expand Down

0 comments on commit 216e0db

Please sign in to comment.