tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ContainerBase.java StandardContext.java StandardEngine.java StandardHost.java
Date Fri, 23 May 2003 10:54:36 GMT
remm        2003/05/23 03:54:36

  Modified:    catalina/src/share/org/apache/catalina/core
                        ContainerBase.java StandardContext.java
                        StandardEngine.java StandardHost.java
  Log:
  - Better name: backgroundProcess.
  
  Revision  Changes    Path
  1.24      +24 -28    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java
  
  Index: ContainerBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ContainerBase.java	22 May 2003 23:04:18 -0000	1.23
  +++ ContainerBase.java	23 May 2003 10:54:35 -0000	1.24
  @@ -208,9 +208,9 @@
   
   
       /**
  -     * The execute delay for this component.
  +     * The processor delay for this component.
        */
  -    protected int executeDelay = -1;
  +    protected int backgroundProcessorDelay = -1;
   
   
       /**
  @@ -346,16 +346,16 @@
   
   
       /**
  -     * Get the delay between the invocation of the execute method on
  +     * Get the delay between the invocation of the backgroundProcess method on
        * this container and its children. Child containers will not be invoked
  -     * if their delay value is not -1 (which would mean they are using their
  -     * own thread). Setting this to a positive value will cause a thread to
  -     * be spawn. After waiting the specified amount of time, the thread will
  -     * invoke the executePeriodic method on this container and all 
  -     * its children.
  +     * if their delay value is not negative (which would mean they are using 
  +     * their own thread). Setting this to a positive value will cause 
  +     * a thread to be spawn. After waiting the specified amount of time, 
  +     * the thread will invoke the executePeriodic method on this container 
  +     * and all its children.
        */
  -    public int getExecuteDelay() {
  -        return executeDelay;
  +    public int getBackgroundProcessorDelay() {
  +        return backgroundProcessorDelay;
       }
   
   
  @@ -363,11 +363,11 @@
        * Set the delay between the invocation of the execute method on this
        * container and its children.
        * 
  -     * @param delay The delay in seconds between the invocation of execute 
  -     *              methods
  +     * @param delay The delay in seconds between the invocation of 
  +     *              backgroundProcess methods
        */
  -    public void setExecuteDelay(int executeDelay) {
  -        this.executeDelay = executeDelay;
  +    public void setBackgroundProcessorDelay(int delay) {
  +        backgroundProcessorDelay = delay;
       }
   
   
  @@ -1371,7 +1371,7 @@
        * invoked inside the classloading context of this container. Unexpected
        * throwables will be caught and logged.
        */
  -    public void execute() {
  +    public void backgroundProcess() {
       }
   
   
  @@ -1583,12 +1583,12 @@
   
           if (thread != null)
               return;
  -        if (executeDelay <= 0)
  +        if (backgroundProcessorDelay <= 0)
               return;
   
           threadDone = false;
  -        String threadName = "ExecuteDelay[" + getName() + "]";
  -        thread = new Thread(new ContainerExecuteDelay(), threadName);
  +        String threadName = "ContainerBackgroundProcessor[" + toString() + "]";
  +        thread = new Thread(new ContainerBackgroundProcessor(), threadName);
           thread.setDaemon(true);
           thread.start();
   
  @@ -1621,19 +1621,15 @@
   
   
       /**
  -     * Private thread class to invoke the execute method of this container 
  -     * and its children after a fixed delay.
  +     * Private thread class to invoke the backgroundProcess method 
  +     * of this container and its children after a fixed delay.
        */
  -    protected class ContainerExecuteDelay implements Runnable {
  +    protected class ContainerBackgroundProcessor implements Runnable {
   
  -
  -        /**
  -         * Perform the requested notification.
  -         */
           public void run() {
               while (!threadDone) {
                   try {
  -                    Thread.sleep(executeDelay * 1000L);
  +                    Thread.sleep(backgroundProcessorDelay * 1000L);
                   } catch (InterruptedException e) {
                       ;
                   }
  @@ -1655,7 +1651,7 @@
                       Thread.currentThread().setContextClassLoader
                           (container.getLoader().getClassLoader());
                   }
  -                container.execute();
  +                container.backgroundProcess();
               } catch (Throwable t) {
                   log.error("Exception invoking periodic operation: ", t);
               } finally {
  @@ -1663,7 +1659,7 @@
               }
               Container[] children = container.findChildren();
               for (int i = 0; i < children.length; i++) {
  -                if (children[i].getExecuteDelay() <= 0) {
  +                if (children[i].getBackgroundProcessorDelay() <= 0) {
                       processChildren(children[i], cl);
                   }
               }
  
  
  
  1.59      +2 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- StandardContext.java	22 May 2003 23:04:18 -0000	1.58
  +++ StandardContext.java	23 May 2003 10:54:35 -0000	1.59
  @@ -4397,7 +4397,7 @@
        * invoked inside the classloading context of this container. Unexpected
        * throwables will be caught and logged.
        */
  -    public void execute() {
  +    public void backgroundProcess() {
   
           if (!started)
               return;
  
  
  
  1.21      +2 -3      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- StandardEngine.java	22 May 2003 23:04:18 -0000	1.20
  +++ StandardEngine.java	23 May 2003 10:54:35 -0000	1.21
  @@ -112,7 +112,7 @@
           } catch(Exception ex) {
           }
           // By default, the engine will hold the reloading thread
  -        executeDelay = 10;
  +        backgroundProcessorDelay = 10;
   
       }
   
  @@ -595,4 +595,3 @@
       }
       
   }
  -                                                          
  
  
  
  1.16      +2 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- StandardHost.java	22 May 2003 23:04:18 -0000	1.15
  +++ StandardHost.java	23 May 2003 10:54:35 -0000	1.16
  @@ -779,7 +779,7 @@
        * invoked inside the classloading context of this container. Unexpected
        * throwables will be caught and logged.
        */
  -    public void execute() {
  +    public void backgroundProcess() {
           lifecycle.fireLifecycleEvent("check", null);
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message