directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r421120 - in /directory/branches/apacheds/optimization: core-config/ core-config/src/ core-config/src/main/ core-config/src/main/java/ core-config/src/test/ core-config/src/test/java/ core/src/main/java/org/apache/directory/server/core/conf...
Date Wed, 12 Jul 2006 05:03:53 GMT
Author: akarasulu
Date: Tue Jul 11 22:03:52 2006
New Revision: 421120

URL: http://svn.apache.org/viewvc?rev=421120&view=rev
Log:
changes ....

 o added additional configuration settings to control the server but soon I 
   realized that these settings belong in the ServerStartupConfiguration and
   not the core StartupConfiguration
 o added maxThreads, maxTimeLimit, and maxSizeLimit
 o only maxThreads is implemented correctly and should work
 o the others require some refactoring
 o preparing to move configuration files to a new maven module or two

NOTE: core configuration and server configuration modules will be created to 
centralize these beans and prevent a dependency nightmare

Added:
    directory/branches/apacheds/optimization/core-config/   (with props)
    directory/branches/apacheds/optimization/core-config/pom.xml
    directory/branches/apacheds/optimization/core-config/src/
    directory/branches/apacheds/optimization/core-config/src/main/
    directory/branches/apacheds/optimization/core-config/src/main/java/
    directory/branches/apacheds/optimization/core-config/src/test/
    directory/branches/apacheds/optimization/core-config/src/test/java/
    directory/branches/apacheds/optimization/server-config/   (with props)
    directory/branches/apacheds/optimization/server-config/pom.xml
    directory/branches/apacheds/optimization/server-config/src/
    directory/branches/apacheds/optimization/server-config/src/main/
    directory/branches/apacheds/optimization/server-config/src/main/java/
    directory/branches/apacheds/optimization/server-config/src/test/
    directory/branches/apacheds/optimization/server-config/src/test/java/
Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java

Propchange: directory/branches/apacheds/optimization/core-config/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul 11 22:03:52 2006
@@ -0,0 +1,16 @@
+target
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+
+nbproject
+

Added: directory/branches/apacheds/optimization/core-config/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-config/pom.xml?rev=421120&view=auto
==============================================================================
--- directory/branches/apacheds/optimization/core-config/pom.xml (added)
+++ directory/branches/apacheds/optimization/core-config/pom.xml Tue Jul 11 22:03:52 2006
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.0-RC4-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-core-config</artifactId>
+  <name>ApacheDS Core Configuration</name>
+  <description>
+    ApacheDS core configuration beans.
+  </description>
+  <packaging>jar</packaging>
+</project>
+

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java?rev=421120&r1=421119&r2=421120&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
Tue Jul 11 22:03:52 2006
@@ -44,7 +44,7 @@
     {
     }
 
-
+    
     /**
      * Creates a new instance that operates on the {@link DirectoryService} with
      * the specified ID.
@@ -54,6 +54,24 @@
         super( instanceId );
     }
 
+
+    public void setMaxThreads( int maxThreads )
+    {
+        super.setMaxThreads( maxThreads );
+    }
+    
+    
+    public void setMaxTimeLimit( long maxTimeLimit )
+    {
+        super.setMaxTimeLimit( maxTimeLimit );
+    }
+    
+    
+    public void setMaxSizeLimit( int maxSizeLimit )
+    {
+        super.setMaxSizeLimit( maxSizeLimit );
+    }
+    
 
     public void setInstanceId( String instanceId )
     {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?rev=421120&r1=421119&r2=421120&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
Tue Jul 11 22:03:52 2006
@@ -56,11 +56,18 @@
 {
     private static final long serialVersionUID = 4826762196566871677L;
 
+    public static final int MAX_THREADS_DEFAULT = 4;
+    public static final int MAX_SIZE_LIMIT_DEFAULT = 100;
+    public static final long MAX_TIME_LIMIT_DEFAULT = 10000;
+
     private File workingDirectory = new File( "server-work" );
     private boolean exitVmOnShutdown = true; // allow by default
     private boolean shutdownHookEnabled = true; // allow by default
     private boolean allowAnonymousAccess = true; // allow by default
     private boolean accessControlEnabled = false; // turn off by default
+    private int maxThreads = MAX_THREADS_DEFAULT; // set to default value
+    private int maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT; // set to default value
+    private long maxTimeLimit = MAX_TIME_LIMIT_DEFAULT; // set to default value (milliseconds)
     private Set authenticatorConfigurations; // Set<AuthenticatorConfiguration>
     private List interceptorConfigurations; // Set<InterceptorConfiguration>
 
@@ -443,5 +450,45 @@
     public boolean isExitVmOnShutdown()
     {
         return exitVmOnShutdown;
+    }
+
+
+    protected void setMaxThreads( int maxThreads )
+    {
+        this.maxThreads = maxThreads;
+        if ( maxThreads < 1 )
+        {
+            throw new IllegalArgumentException( "Number of max threads should be greater
than 0" );
+        }
+    }
+
+
+    public int getMaxThreads()
+    {
+        return maxThreads;
+    }
+
+
+    protected void setMaxSizeLimit( int maxSizeLimit )
+    {
+        this.maxSizeLimit = maxSizeLimit;
+    }
+
+
+    public int getMaxSizeLimit()
+    {
+        return maxSizeLimit;
+    }
+
+
+    protected void setMaxTimeLimit( long maxTimeLimit )
+    {
+        this.maxTimeLimit = maxTimeLimit;
+    }
+
+
+    public long getMaxTimeLimit()
+    {
+        return maxTimeLimit;
     }
 }

Propchange: directory/branches/apacheds/optimization/server-config/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul 11 22:03:52 2006
@@ -0,0 +1,16 @@
+target
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+
+nbproject
+

Added: directory/branches/apacheds/optimization/server-config/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-config/pom.xml?rev=421120&view=auto
==============================================================================
--- directory/branches/apacheds/optimization/server-config/pom.xml (added)
+++ directory/branches/apacheds/optimization/server-config/pom.xml Tue Jul 11 22:03:52 2006
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.0-RC4-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-server-config</artifactId>
+  <name>ApacheDS Server Configuration</name>
+  <description>
+    ApacheDS server configuration beans.
+  </description>
+  <packaging>jar</packaging>
+</project>
+



Mime
View raw message