Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-773 91e81fbf1 -> 3675a11a5


ignite-773: review


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3675a11a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3675a11a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3675a11a

Branch: refs/heads/ignite-773
Commit: 3675a11a5ba218462955199d17977139371eba18
Parents: 91e81fb
Author: Artem Shutak <ashu...@gridgain.com>
Authored: Wed Apr 22 17:48:41 2015 +0300
Committer: Artem Shutak <ashu...@gridgain.com>
Committed: Wed Apr 22 17:48:41 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      | 93 ++++++++++----------
 .../org/apache/ignite/internal/IgnitionEx.java  | 12 +--
 2 files changed, 54 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3675a11a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
 
b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index e9d3ff4..d77de9e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -148,6 +148,9 @@ public class IgniteConfiguration {
     /** Default keep alive time for system thread pool. */
     public static final long DFLT_SYSTEM_KEEP_ALIVE_TIME = 0;
 
+    /** Default keep alive time for utility thread pool. */
+    public static final long DFLT_UTILITY_KEEP_ALIVE_TIME = 10_000;
+
     /** Default max queue capacity of system thread pool. */
     public static final int DFLT_SYSTEM_THREADPOOL_QUEUE_CAP = 
Integer.MAX_VALUE;
 
@@ -205,17 +208,17 @@ public class IgniteConfiguration {
     /** IGFS pool size. */
     private int igfsPoolSize = AVAILABLE_PROC_CNT;
 
-    /** Default utility cache pool size. */
-    private int utilityCacheDfltPoolSize = DFLT_SYSTEM_CORE_THREAD_CNT;
+    /** Utility cache pool size. */
+    private int utilityCachePoolSize = DFLT_SYSTEM_CORE_THREAD_CNT;
 
-    /** Maximim utility cache pool size. */
-    private int utilityCacheMaxPoolSize = DFLT_SYSTEM_MAX_THREAD_CNT;
+    /** Utility cache pool keep alive time. */
+    private long utilityCacheKeepAliveTime = DFLT_UTILITY_KEEP_ALIVE_TIME;
 
-    /** Default marshller pool size. */
-    private int marshDfltPoolSize = DFLT_SYSTEM_CORE_THREAD_CNT;
+    /** Marshaller pool size. */
+    private int marshCachePoolSize = DFLT_SYSTEM_CORE_THREAD_CNT;
 
-    /** Maximim marshaller pool size. */
-    private int marshMaxPoolSize = DFLT_SYSTEM_MAX_THREAD_CNT;
+    /** Marshaller pool keep alive time. */
+    private long marshCacheKeepAliveTime = DFLT_UTILITY_KEEP_ALIVE_TIME;
 
     /** P2P pool size. */
     private int p2pPoolSize = DFLT_P2P_THREAD_CNT;
@@ -454,8 +457,8 @@ public class IgniteConfiguration {
         lsnrs = cfg.getLocalEventListeners();
         marsh = cfg.getMarshaller();
         marshLocJobs = cfg.isMarshalLocalJobs();
-        marshDfltPoolSize = cfg.getMarshallerDefaultThreadPoolSize();
-        marshMaxPoolSize = cfg.getMarshallerMaximumThreadPoolSize();
+        marshCachePoolSize = cfg.getMarshallerCacheThreadPoolSize();
+        marshCacheKeepAliveTime = cfg.getMarshallerCacheKeepAliveTime();
         mbeanSrv = cfg.getMBeanServer();
         metricsHistSize = cfg.getMetricsHistorySize();
         metricsExpTime = cfg.getMetricsExpireTime();
@@ -481,8 +484,8 @@ public class IgniteConfiguration {
         timeSrvPortRange = cfg.getTimeServerPortRange();
         txCfg = cfg.getTransactionConfiguration();
         userAttrs = cfg.getUserAttributes();
-        utilityCacheDfltPoolSize = cfg.getUtilityCacheDefaultThreadPoolSize();
-        utilityCacheMaxPoolSize = cfg.getUtilityCacheMaximumThreadPoolSize();
+        utilityCachePoolSize = cfg.getUtilityCacheThreadPoolSize();
+        utilityCacheKeepAliveTime = cfg.getUtilityCacheKeepAliveTime();
         waitForSegOnStart = cfg.isWaitForSegmentOnStart();
         warmupClos = cfg.getWarmupClosure();
     }
@@ -670,19 +673,19 @@ public class IgniteConfiguration {
      *
      * @return Default thread pool size to be used in grid for utility cache 
messages.
      */
-    public int getUtilityCacheDefaultThreadPoolSize() {
-        return utilityCacheDfltPoolSize;
+    public int getUtilityCacheThreadPoolSize() {
+        return utilityCachePoolSize;
     }
 
     /**
-     * Maximum size of thread pool that is in charge of processing utility 
cache messages.
+     * Keep alive time of thread pool that is in charge of processing utility 
cache messages.
      * <p>
-     * If not provided, executor service will have size {@link 
#DFLT_SYSTEM_MAX_THREAD_CNT}.
+     * If not provided, executor service will have keep alive time {@link 
#DFLT_UTILITY_KEEP_ALIVE_TIME}.
      *
-     * @return Maximum thread pool size to be used in grid for utility cache 
messages.
+     * @return Thread pool keep alive time (in milliseconds) to be used in 
grid for utility cache messages.
      */
-    public int getUtilityCacheMaximumThreadPoolSize() {
-        return utilityCacheMaxPoolSize;
+    public long getUtilityCacheKeepAliveTime() {
+        return utilityCacheKeepAliveTime;
     }
 
     /**
@@ -692,19 +695,19 @@ public class IgniteConfiguration {
      *
      * @return Default thread pool size to be used in grid for marshaller 
messages.
      */
-    public int getMarshallerDefaultThreadPoolSize() {
-        return marshDfltPoolSize;
+    public int getMarshallerCacheThreadPoolSize() {
+        return marshCachePoolSize;
     }
 
     /**
-     * Maximum size of thread pool that is in charge of processing marshaller 
messages.
+     * Keep alive time of thread pool that is in charge of processing 
marshaller messages.
      * <p>
-     * If not provided, executor service will have size {@link 
#DFLT_SYSTEM_MAX_THREAD_CNT}.
+     * If not provided, executor service will have keep alive time {@link 
#DFLT_UTILITY_KEEP_ALIVE_TIME}.
      *
-     * @return Maximum thread pool size to be used in grid for marshaller 
messages.
+     * @return Thread pool keep alive time (in milliseconds) to be used in 
grid for marshaller messages.
      */
-    public int getMarshallerMaximumThreadPoolSize() {
-        return marshMaxPoolSize;
+    public long getMarshallerCacheKeepAliveTime() {
+        return marshCacheKeepAliveTime;
     }
 
     /**
@@ -761,44 +764,44 @@ public class IgniteConfiguration {
      * Sets default thread pool size that will be used to process utility 
cache messages.
      *
      * @param poolSize Default executor service size to use for utility cache 
messages.
-     * @see IgniteConfiguration#getUtilityCacheDefaultThreadPoolSize()
-     * @see IgniteConfiguration#getUtilityCacheMaximumThreadPoolSize()
+     * @see IgniteConfiguration#getUtilityCacheThreadPoolSize()
+     * @see IgniteConfiguration#getUtilityCacheKeepAliveTime()
      */
-    public void setUtilityCacheDefaultPoolSize(int poolSize) {
-        utilityCacheDfltPoolSize = poolSize;
+    public void setUtilityCachePoolSize(int poolSize) {
+        utilityCachePoolSize = poolSize;
     }
 
     /**
-     * Sets maximum thread pool size that will be used to process utility 
cache messages.
+     * Sets keep alive time of thread pool size that will be used to process 
utility cache messages.
      *
-     * @param poolSize Maximum executor service size to use for utility cache 
messages.
-     * @see IgniteConfiguration#getUtilityCacheDefaultThreadPoolSize()
-     * @see IgniteConfiguration#getUtilityCacheMaximumThreadPoolSize()
+     * @param keepAliveTime Keep alive time of executor service to use for 
utility cache messages.
+     * @see IgniteConfiguration#getUtilityCacheThreadPoolSize()
+     * @see IgniteConfiguration#getUtilityCacheKeepAliveTime()
      */
-    public void setUtilityCacheMaximumPoolSize(int poolSize) {
-        utilityCacheMaxPoolSize = poolSize;
+    public void setUtilityCacheKeepAliveTime(long keepAliveTime) {
+        utilityCacheKeepAliveTime = keepAliveTime;
     }
 
     /**
      * Sets default thread pool size that will be used to process marshaller 
messages.
      *
      * @param poolSize Default executor service size to use for marshaller 
messages.
-     * @see IgniteConfiguration#getMarshallerDefaultThreadPoolSize()
-     * @see IgniteConfiguration#getMarshallerMaximumThreadPoolSize()
+     * @see IgniteConfiguration#getMarshallerCacheThreadPoolSize()
+     * @see IgniteConfiguration#getMarshallerCacheKeepAliveTime()
      */
-    public void setMarshallerDefaultPoolSize(int poolSize) {
-        marshDfltPoolSize = poolSize;
+    public void setMarshallerCachePoolSize(int poolSize) {
+        marshCachePoolSize = poolSize;
     }
 
     /**
      * Sets maximum thread pool size that will be used to process marshaller 
messages.
      *
-     * @param poolSize Maximum executor service size to use for marshaller 
messages.
-     * @see IgniteConfiguration#getMarshallerDefaultThreadPoolSize()
-     * @see IgniteConfiguration#getMarshallerMaximumThreadPoolSize()
+     * @param keepAliveTime Keep alive time of executor service to use for 
marshaller messages.
+     * @see IgniteConfiguration#getMarshallerCacheThreadPoolSize()
+     * @see IgniteConfiguration#getMarshallerCacheKeepAliveTime()
      */
-    public void setMarshallerMaximumPoolSize(int poolSize) {
-        marshMaxPoolSize = poolSize;
+    public void setMarshallerCacheKeepAliveTime(long keepAliveTime) {
+        marshCacheKeepAliveTime = keepAliveTime;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3675a11a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 55c3628..56ec3ae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -1418,16 +1418,16 @@ public class IgnitionEx {
 
             utilityCacheExecSvc = new IgniteThreadPoolExecutor(
                 "utility-" + cfg.getGridName(),
-                myCfg.getUtilityCacheDefaultThreadPoolSize(),
-                myCfg.getUtilityCacheMaximumThreadPoolSize(),
-                DFLT_SYSTEM_KEEP_ALIVE_TIME,
+                myCfg.getUtilityCacheThreadPoolSize(),
+                DFLT_SYSTEM_MAX_THREAD_CNT,
+                myCfg.getUtilityCacheKeepAliveTime(),
                 new 
LinkedBlockingQueue<Runnable>(DFLT_SYSTEM_THREADPOOL_QUEUE_CAP));
 
             marshCacheExecSvc = new IgniteThreadPoolExecutor(
                 "marshaller-cache-" + cfg.getGridName(),
-                myCfg.getMarshallerDefaultThreadPoolSize(),
-                myCfg.getMarshallerMaximumThreadPoolSize(),
-                DFLT_SYSTEM_KEEP_ALIVE_TIME,
+                myCfg.getMarshallerCacheThreadPoolSize(),
+                DFLT_SYSTEM_MAX_THREAD_CNT,
+                myCfg.getMarshallerCacheKeepAliveTime(),
                 new 
LinkedBlockingQueue<Runnable>(DFLT_SYSTEM_THREADPOOL_QUEUE_CAP));
 
             // Register Ignite MBean for current grid instance.

Reply via email to