servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r1085571 - in /servicemix/utils/trunk/src: main/java/org/apache/servicemix/executors/impl/ test/java/org/apache/servicemix/executors/impl/
Date Fri, 25 Mar 2011 21:45:36 GMT
Author: gertv
Date: Fri Mar 25 21:45:36 2011
New Revision: 1085571

URL: http://svn.apache.org/viewvc?rev=1085571&view=rev
Log:
Fix NMR build by using wrappers instead of primitives for both getter and setter in ExecutorConfig

Modified:
    servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorConfig.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/impl/ExecutorConfig.java
URL: http://svn.apache.org/viewvc/servicemix/utils/trunk/src/main/java/org/apache/servicemix/executors/impl/ExecutorConfig.java?rev=1085571&r1=1085570&r2=1085571&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
Fri Mar 25 21:45:36 2011
@@ -30,15 +30,15 @@ import static org.apache.servicemix.exec
  */
 public class ExecutorConfig {
 
-    public static final int DEFAULT_CORE_POOL_SIZE = 4;
-    public static final int DEFAULT_MAXIMUM_POOL_SIZE = -1;
-    public static final long DEFAULT_KEEP_ALIVE_TIME = 60000;
-    public static final boolean DEFAULT_THREAD_DAEMON = false;
-    public static final int DEFAULT_THREAD_PRIORITY = Thread.NORM_PRIORITY;
-    public static final int DEFAULT_QUEUE_SIZE = 1024;
-    public static final long DEFAULT_SHUTDOWN_DELAY = 1000;
-    public static final boolean DEFAULT_ALLOW_CORE_THREAD_TIMEOUT = true;
-    public static final boolean DEFAULT_BYPASS_IF_SYNCHRONOUS = false;
+    public static final Integer DEFAULT_CORE_POOL_SIZE = 4;
+    public static final Integer DEFAULT_MAXIMUM_POOL_SIZE = -1;
+    public static final Long DEFAULT_KEEP_ALIVE_TIME = 60000l;
+    public static final Boolean DEFAULT_THREAD_DAEMON = false;
+    public static final Integer DEFAULT_THREAD_PRIORITY = Thread.NORM_PRIORITY;
+    public static final Integer DEFAULT_QUEUE_SIZE = 1024;
+    public static final Long DEFAULT_SHUTDOWN_DELAY = 1000l;
+    public static final Boolean DEFAULT_ALLOW_CORE_THREAD_TIMEOUT = true;
+    public static final Boolean DEFAULT_BYPASS_IF_SYNCHRONOUS = false;
 
     private ExecutorConfig parent;
 
@@ -91,7 +91,7 @@ public class ExecutorConfig {
     /**
      * @return the corePoolSize
      */
-    public int getCorePoolSize() {
+    public Integer getCorePoolSize() {
         return getParent() != null && corePoolSize == null ? getParent().getCorePoolSize()
: corePoolSize;
     }
 
@@ -106,7 +106,7 @@ public class ExecutorConfig {
     /**
      * @return the keepAlive
      */
-    public long getKeepAliveTime() {
+    public Long getKeepAliveTime() {
         return getParent() != null && keepAliveTime == null ? getParent().getKeepAliveTime()
: keepAliveTime;
     }
 
@@ -121,7 +121,7 @@ public class ExecutorConfig {
     /**
      * @return the maximumPoolSize
      */
-    public int getMaximumPoolSize() {
+    public Integer getMaximumPoolSize() {
         return getParent() != null && maximumPoolSize == null ? getParent().getMaximumPoolSize()
: maximumPoolSize;
     }
 
@@ -136,7 +136,7 @@ public class ExecutorConfig {
     /**
      * @return the queueSize
      */
-    public int getQueueSize() {
+    public Integer getQueueSize() {
         return getParent() != null && queueSize == null ? getParent().getQueueSize()
: queueSize;
     }
 
@@ -151,7 +151,7 @@ public class ExecutorConfig {
     /**
      * @return the threadDaemon
      */
-    public boolean isThreadDaemon() {
+    public Boolean isThreadDaemon() {
         return getParent() != null && threadDaemon == null ? getParent().isThreadDaemon()
: threadDaemon;
     }
 
@@ -166,7 +166,7 @@ public class ExecutorConfig {
     /**
      * @return the threadPriority
      */
-    public int getThreadPriority() {
+    public Integer getThreadPriority() {
         return getParent() != null && threadPriority == null ? getParent().getThreadPriority()
: threadPriority;
     }
 
@@ -181,7 +181,7 @@ public class ExecutorConfig {
     /**
      * @return the shutdownDelay
      */
-    public long getShutdownDelay() {
+    public Long getShutdownDelay() {
         return getParent() != null && shutdownDelay == null ? getParent().getShutdownDelay()
: shutdownDelay;
     }
 
@@ -196,7 +196,7 @@ public class ExecutorConfig {
     /**
      * @return the allowCoreThreadsTimeout
      */
-    public boolean isAllowCoreThreadsTimeout() {
+    public Boolean isAllowCoreThreadsTimeout() {
         return getParent() != null && allowCoreThreadsTimeout == null ? getParent().isAllowCoreThreadsTimeout()
: allowCoreThreadsTimeout;
     }
 
@@ -211,7 +211,7 @@ public class ExecutorConfig {
     /**
      * @return if synchronous tasks should bypass the executor
      */
-    public boolean isBypassIfSynchronous() {
+    public Boolean isBypassIfSynchronous() {
         return getParent() != null && bypassIfSynchronous == null ? getParent().isBypassIfSynchronous()
: bypassIfSynchronous;
     }
 

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=1085571&r1=1085570&r2=1085571&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
Fri Mar 25 21:45:36 2011
@@ -43,12 +43,12 @@ public class ExecutorConfigTest {
         data.put(THREAD_DAEMON, true);
 
         ExecutorConfig config = ExecutorConfig.create(data, null);
-        assertEquals(5, config.getCorePoolSize());
-        assertEquals(10, config.getMaximumPoolSize());
-        assertEquals(50, config.getQueueSize());
-        assertEquals(3000, config.getKeepAliveTime());
-        assertEquals(9000, config.getShutdownDelay());
-        assertEquals(9, config.getThreadPriority());
+        assertEquals(new Integer(5), config.getCorePoolSize());
+        assertEquals(new Integer(10), config.getMaximumPoolSize());
+        assertEquals(new Integer(50), config.getQueueSize());
+        assertEquals(new Long(3000), config.getKeepAliveTime());
+        assertEquals(new Long(9000), config.getShutdownDelay());
+        assertEquals(new Integer(9), config.getThreadPriority());
         assertEquals(true, config.isAllowCoreThreadsTimeout());
         assertEquals(false, config.isBypassIfSynchronous());
         assertEquals(true, config.isThreadDaemon());
@@ -68,12 +68,12 @@ public class ExecutorConfigTest {
         data.put(THREAD_DAEMON, "true");
 
         ExecutorConfig config = ExecutorConfig.create(data, null);
-        assertEquals(5, config.getCorePoolSize());
-        assertEquals(10, config.getMaximumPoolSize());
-        assertEquals(50, config.getQueueSize());
-        assertEquals(3000, config.getKeepAliveTime());
-        assertEquals(9000, config.getShutdownDelay());
-        assertEquals(9, config.getThreadPriority());
+        assertEquals(new Integer(5), config.getCorePoolSize());
+        assertEquals(new Integer(10), config.getMaximumPoolSize());
+        assertEquals(new Integer(50), config.getQueueSize());
+        assertEquals(new Long(3000), config.getKeepAliveTime());
+        assertEquals(new Long(9000), config.getShutdownDelay());
+        assertEquals(new Integer(9), config.getThreadPriority());
         assertEquals(true, config.isAllowCoreThreadsTimeout());
         assertEquals(false, config.isBypassIfSynchronous());
         assertEquals(true, config.isThreadDaemon());
@@ -96,9 +96,9 @@ public class ExecutorConfigTest {
         assertEquals(ExecutorConfig.DEFAULT_CORE_POOL_SIZE, config.getCorePoolSize());
         assertEquals(ExecutorConfig.DEFAULT_MAXIMUM_POOL_SIZE, config.getMaximumPoolSize());
         assertEquals(ExecutorConfig.DEFAULT_QUEUE_SIZE, config.getQueueSize());
-        assertEquals(3000, config.getKeepAliveTime());
-        assertEquals(9000, config.getShutdownDelay());
-        assertEquals(9, config.getThreadPriority());
+        assertEquals(new Long(3000), config.getKeepAliveTime());
+        assertEquals(new Long(9000), config.getShutdownDelay());
+        assertEquals(new Integer(9), config.getThreadPriority());
         assertEquals(true, config.isAllowCoreThreadsTimeout());
         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=1085571&r1=1085570&r2=1085571&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
Fri Mar 25 21:45:36 2011
@@ -53,7 +53,7 @@ public class ExecutorFactoryImplTest {
         assertEquals("Core pool size is the default",
                      defaultConfig.getCorePoolSize(), impl.getConfig().getCorePoolSize());
         assertEquals("Maximum pool size has been altered",
-                10, impl.getConfig().getMaximumPoolSize());
+                     new Integer(10), impl.getConfig().getMaximumPoolSize());
 
     }
 



Mime
View raw message