Author: ffang
Date: Wed Mar 30 06:44:34 2011
New Revision: 1086857

URL: http://svn.apache.org/viewvc?rev=1086857&view=rev
Log:
[SMX4-791]Make allowCoreThreadTimeOut name consistent across mbeans and 
properties

Modified:
    
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/ExecutorFactory.java
    
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorConfig.java
    
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorFactoryImpl.java
    
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutor.java
    
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutorMBean.java
    
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorConfigTest.java
    
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorFactoryImplTest.java

Modified: 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/ExecutorFactory.java
URL: 
http://svn.apache.org/viewvc/servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/ExecutorFactory.java?rev=1086857&r1=1086856&r2=1086857&view=diff
==============================================================================
--- 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/ExecutorFactory.java
 (original)
+++ 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/ExecutorFactory.java
 Wed Mar 30 06:44:34 2011
@@ -31,7 +31,7 @@ public interface ExecutorFactory {
      * Configuration properties than can be passed along when creating an 
executor.
      * Every ExecutorFactory implementation can support one or more of these 
options, ignoring the unsupported ones.
      */
-    String ALLOW_CORE_THREADS_TIMEOUT = ExecutorFactory.class.getName() + 
".AllowCoreThreadsTimeout";
+    String ALLOW_CORE_THREADS_TIMEOUT = ExecutorFactory.class.getName() + 
".AllowCoreThreadTimeOut";
     String BYPASS_IF_SYNCHRONOUS = ExecutorFactory.class.getName() + 
".BypassIfSynchronous";
     String CORE_POOL_SIZE = ExecutorFactory.class.getName() + ".CorePoolSize";
     String KEEP_ALIVE_TIME = ExecutorFactory.class.getName() + 
".KeepAliveTime";

Modified: 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorConfig.java
URL: 
http://svn.apache.org/viewvc/servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorConfig.java?rev=1086857&r1=1086856&r2=1086857&view=diff
==============================================================================
--- 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorConfig.java
 (original)
+++ 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorConfig.java
 Wed Mar 30 06:44:34 2011
@@ -56,7 +56,7 @@ public class ExecutorConfig {
 
     private Long shutdownDelay;
 
-    private Boolean allowCoreThreadsTimeout;
+    private Boolean allowCoreThreadTimeOut;
 
     private Boolean bypassIfSynchronous;
 
@@ -80,7 +80,7 @@ public class ExecutorConfig {
             setShutdownDelay(DEFAULT_SHUTDOWN_DELAY);
             setThreadDaemon(DEFAULT_THREAD_DAEMON);
             setThreadPriority(DEFAULT_THREAD_PRIORITY);
-            setAllowCoreThreadsTimeout(DEFAULT_ALLOW_CORE_THREAD_TIMEOUT);
+            setAllowCoreThreadTimeOut(DEFAULT_ALLOW_CORE_THREAD_TIMEOUT);
             setBypassIfSynchronous(DEFAULT_BYPASS_IF_SYNCHRONOUS);
             setCorePoolSize(DEFAULT_CORE_POOL_SIZE);
             setKeepAliveTime(DEFAULT_KEEP_ALIVE_TIME);
@@ -194,18 +194,18 @@ public class ExecutorConfig {
     }
 
     /**
-     * @return the allowCoreThreadsTimeout
+     * @return the allowCoreThreadTimeOut
      */
-    public Boolean isAllowCoreThreadsTimeout() {
-        return getParent() != null && allowCoreThreadsTimeout == null ? 
getParent().isAllowCoreThreadsTimeout() : allowCoreThreadsTimeout;
+    public Boolean isAllowCoreThreadTimeOut() {
+        return getParent() != null && allowCoreThreadTimeOut == null ? 
getParent().isAllowCoreThreadTimeOut() : allowCoreThreadTimeOut;
     }
 
     /**
-     * @param allowCoreThreadsTimeout
-     *            the allowCoreThreadsTimeout to set
+     * @param allowCoreThreadTimeOut
+     *            the allowCoreThreadTimeOut to set
      */
-    public void setAllowCoreThreadsTimeout(Boolean allowCoreThreadsTimeout) {
-        this.allowCoreThreadsTimeout = allowCoreThreadsTimeout;
+    public void setAllowCoreThreadTimeOut(Boolean allowCoreThreadTimeOut) {
+        this.allowCoreThreadTimeOut = allowCoreThreadTimeOut;
     }
 
     /**
@@ -249,7 +249,7 @@ public class ExecutorConfig {
         result.setKeepAliveTime(converter.as(options.get(KEEP_ALIVE_TIME), 
Long.class));
         result.setShutdownDelay(converter.as(options.get(SHUTDOWN_DELAY), 
Long.class));
 
-        
result.setAllowCoreThreadsTimeout(converter.as(options.get(ALLOW_CORE_THREADS_TIMEOUT),
 Boolean.class));
+        
result.setAllowCoreThreadTimeOut(converter.as(options.get(ALLOW_CORE_THREADS_TIMEOUT),
 Boolean.class));
         
result.setBypassIfSynchronous(converter.as(options.get(BYPASS_IF_SYNCHRONOUS), 
Boolean.class));
         result.setThreadDaemon(converter.as(options.get(THREAD_DAEMON), 
Boolean.class));
 

Modified: 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorFactoryImpl.java?rev=1086857&r1=1086856&r2=1086857&view=diff
==============================================================================
--- 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorFactoryImpl.java
 (original)
+++ 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorFactoryImpl.java
 Wed Mar 30 06:44:34 2011
@@ -120,7 +120,7 @@ public class ExecutorFactoryImpl impleme
         ThreadPoolExecutor service = new 
ThreadPoolExecutor(config.getCorePoolSize(),
                 config.getMaximumPoolSize() < 0 ? Integer.MAX_VALUE : 
config.getMaximumPoolSize(), config
                 .getKeepAliveTime(), TimeUnit.MILLISECONDS, queue, factory, 
handler);
-        if (config.isAllowCoreThreadsTimeout()) {
+        if (config.isAllowCoreThreadTimeOut()) {
             try {
                 Method mth = 
service.getClass().getMethod("allowCoreThreadTimeOut", new 
Class[]{boolean.class});
                 mth.invoke(service, new Object[]{Boolean.TRUE});

Modified: 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutor.java
URL: 
http://svn.apache.org/viewvc/servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutor.java?rev=1086857&r1=1086856&r2=1086857&view=diff
==============================================================================
--- 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutor.java
 (original)
+++ 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutor.java
 Wed Mar 30 06:44:34 2011
@@ -102,7 +102,7 @@ public class ManagedExecutor extends jav
         return this.internalExecutor != null ? this.internalExecutor.size() : 
0;
     }
 
-    public boolean isAllowCoreThreadTimeout() {
+    public boolean isAllowCoreThreadTimeOut() {
         if (this.internalExecutor != null) {
             ThreadPoolExecutor executor = 
this.internalExecutor.getThreadPoolExecutor();
             try {

Modified: 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutorMBean.java
URL: 
http://svn.apache.org/viewvc/servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutorMBean.java?rev=1086857&r1=1086856&r2=1086857&view=diff
==============================================================================
--- 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutorMBean.java
 (original)
+++ 
servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ManagedExecutorMBean.java
 Wed Mar 30 06:44:34 2011
@@ -44,7 +44,7 @@ public interface ManagedExecutorMBean {
 
     int getQueueSize();
 
-    boolean isAllowCoreThreadTimeout();
+    boolean isAllowCoreThreadTimeOut();
 
     long getNumberOfRejectedExecutions();
 

Modified: 
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorConfigTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorConfigTest.java?rev=1086857&r1=1086856&r2=1086857&view=diff
==============================================================================
--- 
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorConfigTest.java
 (original)
+++ 
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorConfigTest.java
 Wed Mar 30 06:44:34 2011
@@ -49,7 +49,7 @@ public class ExecutorConfigTest {
         assertEquals(new Long(3000), config.getKeepAliveTime());
         assertEquals(new Long(9000), config.getShutdownDelay());
         assertEquals(new Integer(9), config.getThreadPriority());
-        assertEquals(true, config.isAllowCoreThreadsTimeout());
+        assertEquals(true, config.isAllowCoreThreadTimeOut());
         assertEquals(false, config.isBypassIfSynchronous());
         assertEquals(true, config.isThreadDaemon());
     }
@@ -74,7 +74,7 @@ public class ExecutorConfigTest {
         assertEquals(new Long(3000), config.getKeepAliveTime());
         assertEquals(new Long(9000), config.getShutdownDelay());
         assertEquals(new Integer(9), config.getThreadPriority());
-        assertEquals(true, config.isAllowCoreThreadsTimeout());
+        assertEquals(true, config.isAllowCoreThreadTimeOut());
         assertEquals(false, config.isBypassIfSynchronous());
         assertEquals(true, config.isThreadDaemon());
     }
@@ -99,7 +99,7 @@ public class ExecutorConfigTest {
         assertEquals(new Long(3000), config.getKeepAliveTime());
         assertEquals(new Long(9000), config.getShutdownDelay());
         assertEquals(new Integer(9), config.getThreadPriority());
-        assertEquals(true, config.isAllowCoreThreadsTimeout());
+        assertEquals(true, config.isAllowCoreThreadTimeOut());
         assertEquals(false, config.isBypassIfSynchronous());
         assertEquals(true, config.isThreadDaemon());
     }

Modified: 
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorFactoryImplTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorFactoryImplTest.java?rev=1086857&r1=1086856&r2=1086857&view=diff
==============================================================================
--- 
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorFactoryImplTest.java
 (original)
+++ 
servicemix/utils/trunk/src/test/java/org/apache/servicemix/executors/impl/ExecutorFactoryImplTest.java
 Wed Mar 30 06:44:34 2011
@@ -41,7 +41,7 @@ public class ExecutorFactoryImplTest {
         defaultConfig.setCorePoolSize(1);
         defaultConfig.setMaximumPoolSize(2);
         defaultConfig.setQueueSize(3);
-        defaultConfig.setAllowCoreThreadsTimeout(true);
+        defaultConfig.setAllowCoreThreadTimeOut(true);
         factory.setDefaultConfig(defaultConfig);
     }
 


Reply via email to