Author: remm
Date: Wed Nov 28 18:53:36 2018
New Revision: 1847668
URL: http://svn.apache.org/viewvc?rev=1847668&view=rev
Log:
Clarifications and improvements
Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
tomcat/trunk/webapps/docs/config/server.xml
Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=1847668&r1=1847667&r2=1847668&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Wed Nov 28
18:53:36 2018
@@ -211,9 +211,9 @@ public final class StandardServer extend
/**
- * The lifecycle event period.
+ * The lifecycle event period in seconds.
*/
- protected int eventPeriod = 10;
+ protected int periodicEventDelay = 10;
// ------------------------------------------------------------- Properties
@@ -483,18 +483,18 @@ public final class StandardServer extend
/**
* @return The period between two lifecycle events, in seconds
*/
- public int getEventPeriod() {
- return eventPeriod;
+ public final int getPeriodicEventDelay() {
+ return periodicEventDelay;
}
/**
- * Set the new period between two lifecycle events.
+ * Set the new period between two lifecycle events in seconds.
* @param eventPeriod The period in seconds, negative or zero will
* disable events
*/
- public final void setEventPeriod(int eventPeriod) {
- this.eventPeriod = eventPeriod;
+ public final void setPeriodicEventDelay(int periodicEventDelay) {
+ this.periodicEventDelay = periodicEventDelay;
}
@@ -936,7 +936,7 @@ public final class StandardServer extend
}
}
- if (eventPeriod > 0) {
+ if (periodicEventDelay > 0) {
monitorFuture = getUtilityExecutor().scheduleWithFixedDelay(
new Runnable() {
@Override
@@ -964,7 +964,7 @@ public final class StandardServer extend
public void run() {
fireLifecycleEvent(Lifecycle.PERIODIC_EVENT, null);
}
- }, eventPeriod, eventPeriod, TimeUnit.SECONDS);
+ }, periodicEventDelay, periodicEventDelay,
TimeUnit.SECONDS);
}
}
Modified: tomcat/trunk/webapps/docs/config/server.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/server.xml?rev=1847668&r1=1847667&r2=1847668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/server.xml (original)
+++ tomcat/trunk/webapps/docs/config/server.xml Wed Nov 28 18:53:36 2018
@@ -117,6 +117,14 @@
</p>
</attribute>
+ <attribute name="periodicEventDelay" required="false">
+ <p>This value represents the delay in seconds between periodic
+ lifecycle event invocation of the lifecycle listeners configured on this
+ Server. The value is in seconds, and a negative or zero value will
+ disable the invocations. If not specified, the default value for this
+ attribute is 10 seconds.</p>
+ </attribute>
+
</attributes>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]