ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: ignite-786: Allow chaining setters for CacheConfiguration and IgniteConfiguration
Date Tue, 28 Apr 2015 09:04:20 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-786 [created] f5a6d45c5


ignite-786: Allow chaining setters for CacheConfiguration and IgniteConfiguration


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

Branch: refs/heads/ignite-786
Commit: f5a6d45c5bbd5e411b35dc406ca176330e72e1a0
Parents: 19bd611
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Tue Apr 28 12:04:17 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Tue Apr 28 12:04:17 2015 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       | 204 ++++++++++----
 .../configuration/IgniteConfiguration.java      | 276 ++++++++++++++-----
 2 files changed, 360 insertions(+), 120 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5a6d45c/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 4931bdd..83f79a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -418,10 +418,12 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param name Cache name. May be <tt>null</tt>, but may not be empty string.
      */
-    public void setName(String name) {
+    public CacheConfiguration setName(String name) {
         A.ensure(name == null || !name.isEmpty(), "Name cannot be null or empty.");
 
         this.name = name;
+
+        return this;
     }
 
     /**
@@ -440,8 +442,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param evictPlc Cache expiration policy.
      */
-    public void setEvictionPolicy(@Nullable EvictionPolicy evictPlc) {
+    public CacheConfiguration setEvictionPolicy(@Nullable EvictionPolicy evictPlc) {
         this.evictPlc = evictPlc;
+
+        return this;
     }
 
     /**
@@ -454,8 +458,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     /**
      * @param nearCfg Near cache configuration.
      */
-    public void setNearConfiguration(NearCacheConfiguration<K, V> nearCfg) {
+    public CacheConfiguration setNearConfiguration(NearCacheConfiguration<K, V> nearCfg) {
         this.nearCfg = nearCfg;
+
+        return this;
     }
 
     /**
@@ -473,8 +479,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param writeSync Write synchronization mode.
      */
-    public void setWriteSynchronizationMode(CacheWriteSynchronizationMode writeSync) {
+    public CacheConfiguration setWriteSynchronizationMode(CacheWriteSynchronizationMode writeSync) {
         this.writeSync = writeSync;
+
+        return this;
     }
 
     /**
@@ -491,8 +499,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param nodeFilter Predicate specifying on which nodes the cache should be started.
      */
-    public void setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter) {
+    public CacheConfiguration setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter) {
         this.nodeFilter = nodeFilter;
+
+        return this;
     }
 
     /**
@@ -520,8 +530,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param evictSync {@code true} if synchronized, {@code false} if not.
      */
-    public void setEvictSynchronized(boolean evictSync) {
+    public CacheConfiguration setEvictSynchronized(boolean evictSync) {
         this.evictSync = evictSync;
+
+        return this;
     }
 
     /**
@@ -540,8 +552,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param evictKeyBufSize Eviction key buffer size.
      */
-    public void setEvictSynchronizedKeyBufferSize(int evictKeyBufSize) {
+    public CacheConfiguration setEvictSynchronizedKeyBufferSize(int evictKeyBufSize) {
         this.evictKeyBufSize = evictKeyBufSize;
+
+        return this;
     }
 
     /**
@@ -571,8 +585,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param evictSyncConcurrencyLvl Concurrency level for synchronized evictions.
      */
-    public void setEvictSynchronizedConcurrencyLevel(int evictSyncConcurrencyLvl) {
+    public CacheConfiguration setEvictSynchronizedConcurrencyLevel(int evictSyncConcurrencyLvl) {
         this.evictSyncConcurrencyLvl = evictSyncConcurrencyLvl;
+
+        return this;
     }
 
     /**
@@ -594,8 +610,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param evictSyncTimeout Timeout for synchronized evictions.
      */
-    public void setEvictSynchronizedTimeout(long evictSyncTimeout) {
+    public CacheConfiguration setEvictSynchronizedTimeout(long evictSyncTimeout) {
         this.evictSyncTimeout = evictSyncTimeout;
+
+        return this;
     }
 
     /**
@@ -623,8 +641,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param evictMaxOverflowRatio Maximum eviction overflow ratio.
      */
-    public void setEvictMaxOverflowRatio(float evictMaxOverflowRatio) {
+    public CacheConfiguration setEvictMaxOverflowRatio(float evictMaxOverflowRatio) {
         this.evictMaxOverflowRatio = evictMaxOverflowRatio;
+
+        return this;
     }
 
     /**
@@ -649,8 +669,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param evictFilter Eviction filter.
      */
-    public void setEvictionFilter(EvictionFilter<K, V> evictFilter) {
+    public CacheConfiguration setEvictionFilter(EvictionFilter<K, V> evictFilter) {
         this.evictFilter = evictFilter;
+
+        return this;
     }
 
     /**
@@ -675,8 +697,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param eagerTtl {@code True} if Ignite should eagerly remove expired cache entries.
      * @see #isEagerTtl()
      */
-    public void setEagerTtl(boolean eagerTtl) {
+    public CacheConfiguration setEagerTtl(boolean eagerTtl) {
         this.eagerTtl = eagerTtl;
+
+        return this;
     }
 
     /**
@@ -694,8 +718,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param startSize Cache start size.
      */
-    public void setStartSize(int startSize) {
+    public CacheConfiguration setStartSize(int startSize) {
         this.startSize = startSize;
+
+        return this;
     }
 
     /**
@@ -735,8 +761,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param loadPrevVal Load previous value flag.
      */
-    public void setLoadPreviousValue(boolean loadPrevVal) {
+    public CacheConfiguration setLoadPreviousValue(boolean loadPrevVal) {
         this.loadPrevVal = loadPrevVal;
+
+        return this;
     }
 
     /**
@@ -755,8 +783,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param storeFactory Cache store factory.
      */
     @SuppressWarnings("unchecked")
-    public void setCacheStoreFactory(Factory<? extends CacheStore<? super K, ? super V>> storeFactory) {
+    public CacheConfiguration setCacheStoreFactory(Factory<? extends CacheStore<? super K, ? super V>> storeFactory) {
         this.storeFactory = storeFactory;
+
+        return this;
     }
 
     /**
@@ -773,8 +803,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param aff Cache key affinity.
      */
-    public void setAffinity(AffinityFunction aff) {
+    public CacheConfiguration setAffinity(AffinityFunction aff) {
         this.aff = aff;
+
+        return this;
     }
 
     /**
@@ -793,8 +825,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param cacheMode Caching mode.
      */
-    public void setCacheMode(CacheMode cacheMode) {
+    public CacheConfiguration setCacheMode(CacheMode cacheMode) {
         this.cacheMode = cacheMode;
+
+        return this;
     }
 
     /**
@@ -813,8 +847,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param atomicityMode Cache atomicity mode.
      */
-    public void setAtomicityMode(CacheAtomicityMode atomicityMode) {
+    public CacheConfiguration setAtomicityMode(CacheAtomicityMode atomicityMode) {
         this.atomicityMode = atomicityMode;
+
+        return this;
     }
 
     /**
@@ -833,8 +869,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param atomicWriteOrderMode Cache write ordering mode.
      */
-    public void setAtomicWriteOrderMode(CacheAtomicWriteOrderMode atomicWriteOrderMode) {
+    public CacheConfiguration setAtomicWriteOrderMode(CacheAtomicWriteOrderMode atomicWriteOrderMode) {
         this.atomicWriteOrderMode = atomicWriteOrderMode;
+
+        return this;
     }
 
     /**
@@ -855,8 +893,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param backups Number of backup nodes for one partition.
      */
-    public void setBackups(int backups) {
+    public CacheConfiguration setBackups(int backups) {
         this.backups = backups;
+
+        return this;
     }
 
     /**
@@ -874,8 +914,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param dfltLockTimeout Default lock timeout.
      */
-    public void setDefaultLockTimeout(long dfltLockTimeout) {
+    public CacheConfiguration setDefaultLockTimeout(long dfltLockTimeout) {
         this.dfltLockTimeout = dfltLockTimeout;
+
+        return this;
     }
 
     /**
@@ -892,8 +934,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param invalidate Flag to set this cache into invalidation-based mode. Default value is {@code false}.
      */
-    public void setInvalidate(boolean invalidate) {
+    public CacheConfiguration setInvalidate(boolean invalidate) {
         this.invalidate = invalidate;
+
+        return this;
     }
 
     /**
@@ -911,8 +955,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param tmLookupClsName Name of class implementing GridCacheTmLookup interface that is used to
      *      receive JTA transaction manager.
      */
-    public void setTransactionManagerLookupClassName(String tmLookupClsName) {
+    public CacheConfiguration setTransactionManagerLookupClassName(String tmLookupClsName) {
         this.tmLookupClsName = tmLookupClsName;
+
+        return this;
     }
 
     /**
@@ -920,8 +966,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param rebalanceMode Rebalance mode.
      */
-    public void setRebalanceMode(CacheRebalanceMode rebalanceMode) {
+    public CacheConfiguration setRebalanceMode(CacheRebalanceMode rebalanceMode) {
         this.rebalanceMode = rebalanceMode;
+
+        return this;
     }
 
     /**
@@ -960,8 +1008,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param rebalanceOrder Cache rebalance order.
      * @see #getRebalanceOrder()
      */
-    public void setRebalanceOrder(int rebalanceOrder) {
+    public CacheConfiguration setRebalanceOrder(int rebalanceOrder) {
         this.rebalanceOrder = rebalanceOrder;
+
+        return this;
     }
 
     /**
@@ -981,8 +1031,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param rebalanceBatchSize Rebalance batch size.
      */
-    public void setRebalanceBatchSize(int rebalanceBatchSize) {
+    public CacheConfiguration setRebalanceBatchSize(int rebalanceBatchSize) {
         this.rebalanceBatchSize = rebalanceBatchSize;
+
+        return this;
     }
 
     /**
@@ -1000,8 +1052,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param swapEnabled {@code True} if swap storage is enabled.
      */
-    public void setSwapEnabled(boolean swapEnabled) {
+    public CacheConfiguration setSwapEnabled(boolean swapEnabled) {
         this.swapEnabled = swapEnabled;
+
+        return this;
     }
 
     /**
@@ -1026,8 +1080,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param maxConcurrentAsyncOps Maximum number of concurrent asynchronous operations.
      * @see #getMaxConcurrentAsyncOperations()
      */
-    public void setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOps) {
+    public CacheConfiguration setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOps) {
         this.maxConcurrentAsyncOps = maxConcurrentAsyncOps;
+
+        return this;
     }
 
     /**
@@ -1046,8 +1102,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param writeBehindEnabled {@code true} if write-behind is enabled.
      */
-    public void setWriteBehindEnabled(boolean writeBehindEnabled) {
+    public CacheConfiguration setWriteBehindEnabled(boolean writeBehindEnabled) {
         this.writeBehindEnabled = writeBehindEnabled;
+
+        return this;
     }
 
     /**
@@ -1071,8 +1129,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param writeBehindFlushSize Write-behind cache flush size.
      * @see #getWriteBehindFlushSize()
      */
-    public void setWriteBehindFlushSize(int writeBehindFlushSize) {
+    public CacheConfiguration setWriteBehindFlushSize(int writeBehindFlushSize) {
         this.writeBehindFlushSize = writeBehindFlushSize;
+
+        return this;
     }
 
     /**
@@ -1097,8 +1157,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param writeBehindFlushFreq Write-behind flush frequency in milliseconds.
      * @see #getWriteBehindFlushFrequency()
      */
-    public void setWriteBehindFlushFrequency(long writeBehindFlushFreq) {
+    public CacheConfiguration setWriteBehindFlushFrequency(long writeBehindFlushFreq) {
         this.writeBehindFlushFreq = writeBehindFlushFreq;
+
+        return this;
     }
 
     /**
@@ -1121,8 +1183,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param writeBehindFlushThreadCnt Count of flush threads.
      * @see #getWriteBehindFlushThreadCount()
      */
-    public void setWriteBehindFlushThreadCount(int writeBehindFlushThreadCnt) {
+    public CacheConfiguration setWriteBehindFlushThreadCount(int writeBehindFlushThreadCnt) {
         this.writeBehindFlushThreadCnt = writeBehindFlushThreadCnt;
+
+        return this;
     }
 
     /**
@@ -1145,8 +1209,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param writeBehindBatchSize Maximum batch size.
      * @see #getWriteBehindBatchSize()
      */
-    public void setWriteBehindBatchSize(int writeBehindBatchSize) {
+    public CacheConfiguration setWriteBehindBatchSize(int writeBehindBatchSize) {
         this.writeBehindBatchSize = writeBehindBatchSize;
+
+        return this;
     }
 
     /**
@@ -1167,8 +1233,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param rebalancePoolSize Size of rebalancing thread pool.
      */
-    public void setRebalanceThreadPoolSize(int rebalancePoolSize) {
+    public CacheConfiguration setRebalanceThreadPoolSize(int rebalancePoolSize) {
         this.rebalancePoolSize = rebalancePoolSize;
+
+        return this;
     }
 
     /**
@@ -1187,8 +1255,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param rebalanceTimeout Rebalance timeout (ms).
      */
-    public void setRebalanceTimeout(long rebalanceTimeout) {
+    public CacheConfiguration setRebalanceTimeout(long rebalanceTimeout) {
         this.rebalanceTimeout = rebalanceTimeout;
+
+        return this;
     }
 
     /**
@@ -1222,8 +1292,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param rebalanceDelay Rebalance delay to set.
      */
-    public void setRebalanceDelay(long rebalanceDelay) {
+    public CacheConfiguration setRebalanceDelay(long rebalanceDelay) {
         this.rebalanceDelay = rebalanceDelay;
+
+        return this;
     }
 
     /**
@@ -1255,8 +1327,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param rebalanceThrottle Time in milliseconds to wait between rebalance messages to avoid overloading of CPU,
      * {@code 0} to disable throttling.
      */
-    public void setRebalanceThrottle(long rebalanceThrottle) {
+    public CacheConfiguration setRebalanceThrottle(long rebalanceThrottle) {
         this.rebalanceThrottle = rebalanceThrottle;
+
+        return this;
     }
 
     /**
@@ -1279,8 +1353,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param affMapper Affinity mapper.
      */
-    public void setAffinityMapper(AffinityKeyMapper affMapper) {
+    public CacheConfiguration setAffinityMapper(AffinityKeyMapper affMapper) {
         this.affMapper = affMapper;
+
+        return this;
     }
 
     /**
@@ -1323,8 +1399,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param offHeapMaxMem Maximum memory in bytes available to off-heap memory space.
      */
-    public void setOffHeapMaxMemory(long offHeapMaxMem) {
+    public CacheConfiguration setOffHeapMaxMemory(long offHeapMaxMem) {
         this.offHeapMaxMem = offHeapMaxMem;
+
+        return this;
     }
 
     /**
@@ -1344,8 +1422,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param memMode Memory mode.
      */
-    public void setMemoryMode(CacheMemoryMode memMode) {
+    public CacheConfiguration setMemoryMode(CacheMemoryMode memMode) {
         this.memMode = memMode;
+
+        return this;
     }
 
     /**
@@ -1363,8 +1443,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param interceptor Cache interceptor.
      */
-    public void setInterceptor(CacheInterceptor<K, V> interceptor) {
+    public CacheConfiguration setInterceptor(CacheInterceptor<K, V> interceptor) {
         this.interceptor = interceptor;
+
+        return this;
     }
 
     /**
@@ -1381,8 +1463,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param typeMeta Collection of type metadata.
      */
-    public void setTypeMetadata(Collection<CacheTypeMetadata> typeMeta) {
+    public CacheConfiguration setTypeMetadata(Collection<CacheTypeMetadata> typeMeta) {
         this.typeMeta = typeMeta;
+
+        return this;
     }
 
     /**
@@ -1403,8 +1487,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param readFromBackup {@code true} to allow reads from backups.
      */
-    public void setReadFromBackup(boolean readFromBackup) {
+    public CacheConfiguration setReadFromBackup(boolean readFromBackup) {
         this.readFromBackup = readFromBackup;
+
+        return this;
     }
 
     /**
@@ -1424,8 +1510,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param cpOnRead Copy on get flag.
      * @see #isCopyOnRead
      */
-    public void setCopyOnRead(boolean cpOnRead) {
+    public CacheConfiguration setCopyOnRead(boolean cpOnRead) {
         this.cpOnRead = cpOnRead;
+
+        return this;
     }
 
     /**
@@ -1434,8 +1522,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param cls One or more classes with SQL functions.
      */
-    public void setSqlFunctionClasses(Class<?>... cls) {
+    public CacheConfiguration setSqlFunctionClasses(Class<?>... cls) {
         this.sqlFuncCls = cls;
+
+        return this;
     }
 
     /**
@@ -1462,8 +1552,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param longQryWarnTimeout Timeout in milliseconds.
      */
-    public void setLongQueryWarningTimeout(long longQryWarnTimeout) {
+    public CacheConfiguration setLongQueryWarningTimeout(long longQryWarnTimeout) {
         this.longQryWarnTimeout = longQryWarnTimeout;
+
+        return this;
     }
 
     /**
@@ -1484,8 +1576,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param sqlEscapeAll Flag value.
      */
-    public void setSqlEscapeAll(boolean sqlEscapeAll) {
+    public CacheConfiguration setSqlEscapeAll(boolean sqlEscapeAll) {
         this.sqlEscapeAll = sqlEscapeAll;
+
+        return this;
     }
 
     /**
@@ -1518,11 +1612,13 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param indexedTypes Key and value type pairs.
      */
-    public void setIndexedTypes(Class<?>... indexedTypes) {
+    public CacheConfiguration setIndexedTypes(Class<?>... indexedTypes) {
         A.ensure(indexedTypes == null || (indexedTypes.length & 1) == 0,
             "Number of indexed types is expected to be even. Refer to method javadoc for details.");
 
         this.indexedTypes = indexedTypes;
+
+        return this;
     }
 
     /**
@@ -1543,8 +1639,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param size Cache size.
      * @see #setOffHeapMaxMemory(long)
      */
-    public void setSqlOnheapRowCacheSize(int size) {
+    public CacheConfiguration setSqlOnheapRowCacheSize(int size) {
         this.sqlOnheapRowCacheSize = size;
+
+        return this;
     }
 
     /**
@@ -1561,8 +1659,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @param pluginCfgs Cache plugin configurations.
      */
-    public void setPluginConfigurations(CachePluginConfiguration... pluginCfgs) {
+    public CacheConfiguration setPluginConfigurations(CachePluginConfiguration... pluginCfgs) {
         this.pluginCfgs = pluginCfgs;
+
+        return this;
     }
 
     /**
@@ -1577,8 +1677,10 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * Sets topology validator.
      * @param topValidator validator.
      */
-    public void setTopologyValidator(TopologyValidator topValidator) {
+    public CacheConfiguration setTopologyValidator(TopologyValidator topValidator) {
         this.topValidator = topValidator;
+
+        return this;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5a6d45c/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 252eb19..e1d02a2 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
@@ -534,8 +534,10 @@ public class IgniteConfiguration {
      *
      * @param daemon Daemon flag.
      */
-    public void setDaemon(boolean daemon) {
+    public IgniteConfiguration setDaemon(boolean daemon) {
         this.daemon = daemon;
+
+        return this;
     }
 
     /**
@@ -544,8 +546,10 @@ public class IgniteConfiguration {
      * @param gridName Grid name to set. Can be {@code null}, which is default
      *      grid name.
      */
-    public void setGridName(String gridName) {
+    public IgniteConfiguration setGridName(String gridName) {
         this.gridName = gridName;
+
+        return this;
     }
 
     /**
@@ -578,8 +582,10 @@ public class IgniteConfiguration {
      * @param userAttrs User attributes for this node.
      * @see IgniteConfiguration#getUserAttributes()
      */
-    public void setUserAttributes(Map<String, ?> userAttrs) {
+    public IgniteConfiguration setUserAttributes(Map<String, ?> userAttrs) {
         this.userAttrs = userAttrs;
+
+        return this;
     }
 
     /**
@@ -599,8 +605,10 @@ public class IgniteConfiguration {
      * @param log Logger to use within grid.
      * @see IgniteConfiguration#getGridLogger()
      */
-    public void setGridLogger(IgniteLogger log) {
+    public IgniteConfiguration setGridLogger(IgniteLogger log) {
         this.log = log;
+
+        return this;
     }
 
     /**
@@ -716,8 +724,10 @@ public class IgniteConfiguration {
      * @param poolSize Thread pool size to use within grid.
      * @see IgniteConfiguration#getPublicThreadPoolSize()
      */
-    public void setPublicThreadPoolSize(int poolSize) {
+    public IgniteConfiguration setPublicThreadPoolSize(int poolSize) {
         pubPoolSize = poolSize;
+
+        return this;
     }
 
     /**
@@ -726,8 +736,10 @@ public class IgniteConfiguration {
      * @param poolSize Thread pool size to use within grid.
      * @see IgniteConfiguration#getSystemThreadPoolSize()
      */
-    public void setSystemThreadPoolSize(int poolSize) {
+    public IgniteConfiguration setSystemThreadPoolSize(int poolSize) {
         sysPoolSize = poolSize;
+
+        return this;
     }
 
     /**
@@ -736,8 +748,10 @@ public class IgniteConfiguration {
      * @param poolSize Thread pool size to use within grid.
      * @see IgniteConfiguration#getManagementThreadPoolSize()
      */
-    public void setManagementThreadPoolSize(int poolSize) {
+    public IgniteConfiguration setManagementThreadPoolSize(int poolSize) {
         mgmtPoolSize = poolSize;
+
+        return this;
     }
 
     /**
@@ -746,8 +760,10 @@ public class IgniteConfiguration {
      * @param poolSize Thread pool size to use within grid.
      * @see IgniteConfiguration#getPeerClassLoadingThreadPoolSize()
      */
-    public void setPeerClassLoadingThreadPoolSize(int poolSize) {
+    public IgniteConfiguration setPeerClassLoadingThreadPoolSize(int poolSize) {
         p2pPoolSize = poolSize;
+
+        return this;
     }
 
     /**
@@ -756,8 +772,10 @@ public class IgniteConfiguration {
      * @param poolSize Executor service to use for outgoing IGFS messages.
      * @see IgniteConfiguration#getIgfsThreadPoolSize()
      */
-    public void setIgfsThreadPoolSize(int poolSize) {
+    public IgniteConfiguration setIgfsThreadPoolSize(int poolSize) {
         igfsPoolSize = poolSize;
+
+        return this;
     }
 
     /**
@@ -767,8 +785,10 @@ public class IgniteConfiguration {
      * @see IgniteConfiguration#getUtilityCacheThreadPoolSize()
      * @see IgniteConfiguration#getUtilityCacheKeepAliveTime()
      */
-    public void setUtilityCachePoolSize(int poolSize) {
+    public IgniteConfiguration setUtilityCachePoolSize(int poolSize) {
         utilityCachePoolSize = poolSize;
+
+        return this;
     }
 
     /**
@@ -778,8 +798,10 @@ public class IgniteConfiguration {
      * @see IgniteConfiguration#getUtilityCacheThreadPoolSize()
      * @see IgniteConfiguration#getUtilityCacheKeepAliveTime()
      */
-    public void setUtilityCacheKeepAliveTime(long keepAliveTime) {
+    public IgniteConfiguration setUtilityCacheKeepAliveTime(long keepAliveTime) {
         utilityCacheKeepAliveTime = keepAliveTime;
+
+        return this;
     }
 
     /**
@@ -789,8 +811,10 @@ public class IgniteConfiguration {
      * @see IgniteConfiguration#getMarshallerCacheThreadPoolSize()
      * @see IgniteConfiguration#getMarshallerCacheKeepAliveTime()
      */
-    public void setMarshallerCachePoolSize(int poolSize) {
+    public IgniteConfiguration setMarshallerCachePoolSize(int poolSize) {
         marshCachePoolSize = poolSize;
+
+        return this;
     }
 
     /**
@@ -800,8 +824,10 @@ public class IgniteConfiguration {
      * @see IgniteConfiguration#getMarshallerCacheThreadPoolSize()
      * @see IgniteConfiguration#getMarshallerCacheKeepAliveTime()
      */
-    public void setMarshallerCacheKeepAliveTime(long keepAliveTime) {
+    public IgniteConfiguration setMarshallerCacheKeepAliveTime(long keepAliveTime) {
         marshCacheKeepAliveTime = keepAliveTime;
+
+        return this;
     }
 
     /**
@@ -825,8 +851,10 @@ public class IgniteConfiguration {
      * @see IgniteConfiguration#getIgniteHome()
      * @see IgniteSystemProperties#IGNITE_HOME
      */
-    public void setIgniteHome(String ggHome) {
+    public IgniteConfiguration setIgniteHome(String ggHome) {
         this.ggHome = ggHome;
+
+        return this;
     }
 
     /**
@@ -850,8 +878,10 @@ public class IgniteConfiguration {
      * @param ggWork {@code Ignite} work folder.
      * @see IgniteConfiguration#getWorkDirectory()
      */
-    public void setWorkDirectory(String ggWork) {
+    public IgniteConfiguration setWorkDirectory(String ggWork) {
         this.ggWork = ggWork;
+
+        return this;
     }
 
     /**
@@ -870,8 +900,10 @@ public class IgniteConfiguration {
      *
      * @param mbeanSrv Initialized and started MBean server.
      */
-    public void setMBeanServer(MBeanServer mbeanSrv) {
+    public IgniteConfiguration setMBeanServer(MBeanServer mbeanSrv) {
         this.mbeanSrv = mbeanSrv;
+
+        return this;
     }
 
     /**
@@ -889,8 +921,10 @@ public class IgniteConfiguration {
      * @param nodeId Unique identifier for local node.
      * @see IgniteConfiguration#getNodeId()
      */
-    public void setNodeId(UUID nodeId) {
+    public IgniteConfiguration setNodeId(UUID nodeId) {
         this.nodeId = nodeId;
+
+        return this;
     }
 
     /**
@@ -910,8 +944,10 @@ public class IgniteConfiguration {
      * @param marsh Marshaller to use within grid.
      * @see IgniteConfiguration#getMarshaller()
      */
-    public void setMarshaller(Marshaller marsh) {
+    public IgniteConfiguration setMarshaller(Marshaller marsh) {
         this.marsh = marsh;
+
+        return this;
     }
 
 
@@ -950,8 +986,10 @@ public class IgniteConfiguration {
      *
      * @param marshLocJobs {@code True} if local jobs should be marshalled.
      */
-    public void setMarshalLocalJobs(boolean marshLocJobs) {
+    public IgniteConfiguration setMarshalLocalJobs(boolean marshLocJobs) {
         this.marshLocJobs = marshLocJobs;
+
+        return this;
     }
 
     /**
@@ -960,8 +998,10 @@ public class IgniteConfiguration {
      * @param p2pEnabled {@code true} if peer class loading is
      *      enabled, {@code false} otherwise.
      */
-    public void setPeerClassLoadingEnabled(boolean p2pEnabled) {
+    public IgniteConfiguration setPeerClassLoadingEnabled(boolean p2pEnabled) {
         this.p2pEnabled = p2pEnabled;
+
+        return this;
     }
 
     /**
@@ -984,8 +1024,10 @@ public class IgniteConfiguration {
      * @param p2pLocClsPathExcl List of P2P loaded packages. Package
      *      name supports '*' at the end like in package import clause.
      */
-    public void setPeerClassLoadingLocalClassPathExclude(String... p2pLocClsPathExcl) {
+    public IgniteConfiguration setPeerClassLoadingLocalClassPathExclude(String... p2pLocClsPathExcl) {
         this.p2pLocClsPathExcl = p2pLocClsPathExcl;
+
+        return this;
     }
 
     /**
@@ -1008,8 +1050,10 @@ public class IgniteConfiguration {
      *      metric totals and averages calculations.
      * @see #DFLT_METRICS_HISTORY_SIZE
      */
-    public void setMetricsHistorySize(int metricsHistSize) {
+    public IgniteConfiguration setMetricsHistorySize(int metricsHistSize) {
         this.metricsHistSize = metricsHistSize;
+
+        return this;
     }
 
     /**
@@ -1044,8 +1088,10 @@ public class IgniteConfiguration {
      *
      * @param metricsUpdateFreq Job metrics update frequency in milliseconds.
      */
-    public void setMetricsUpdateFrequency(long metricsUpdateFreq) {
+    public IgniteConfiguration setMetricsUpdateFrequency(long metricsUpdateFreq) {
         this.metricsUpdateFreq = metricsUpdateFreq;
+
+        return this;
     }
 
     /**
@@ -1067,8 +1113,10 @@ public class IgniteConfiguration {
      * @param metricsExpTime The metricsExpTime to set.
      * @see #DFLT_METRICS_EXPIRE_TIME
      */
-    public void setMetricsExpireTime(long metricsExpTime) {
+    public IgniteConfiguration setMetricsExpireTime(long metricsExpTime) {
         this.metricsExpTime = metricsExpTime;
+
+        return this;
     }
 
     /**
@@ -1093,8 +1141,10 @@ public class IgniteConfiguration {
      * @param netTimeout Maximum timeout for network requests.
      * @see #DFLT_NETWORK_TIMEOUT
      */
-    public void setNetworkTimeout(long netTimeout) {
+    public IgniteConfiguration setNetworkTimeout(long netTimeout) {
         this.netTimeout = netTimeout;
+
+        return this;
     }
 
     /**
@@ -1119,8 +1169,10 @@ public class IgniteConfiguration {
      *
      * @param sndRetryDelay Interval between message send retries.
      */
-    public void setNetworkSendRetryDelay(long sndRetryDelay) {
+    public IgniteConfiguration setNetworkSendRetryDelay(long sndRetryDelay) {
         this.sndRetryDelay = sndRetryDelay;
+
+        return this;
     }
 
     /**
@@ -1145,8 +1197,10 @@ public class IgniteConfiguration {
      *
      * @param sndRetryCnt Message send retries count.
      */
-    public void setNetworkSendRetryCount(int sndRetryCnt) {
+    public IgniteConfiguration setNetworkSendRetryCount(int sndRetryCnt) {
         this.sndRetryCnt = sndRetryCnt;
+
+        return this;
     }
 
     /**
@@ -1165,8 +1219,10 @@ public class IgniteConfiguration {
      *
      * @param clockSyncSamples Number of samples.
      */
-    public void setClockSyncSamples(int clockSyncSamples) {
+    public IgniteConfiguration setClockSyncSamples(int clockSyncSamples) {
         this.clockSyncSamples = clockSyncSamples;
+
+        return this;
     }
 
     /**
@@ -1185,8 +1241,10 @@ public class IgniteConfiguration {
      *
      * @param clockSyncFreq Clock synchronization frequency.
      */
-    public void setClockSyncFrequency(long clockSyncFreq) {
+    public IgniteConfiguration setClockSyncFrequency(long clockSyncFreq) {
         this.clockSyncFreq = clockSyncFreq;
+
+        return this;
     }
 
     /**
@@ -1212,8 +1270,10 @@ public class IgniteConfiguration {
      * @param lifecycleBeans Collection of lifecycle beans.
      * @see LifecycleEventType
      */
-    public void setLifecycleBeans(LifecycleBean... lifecycleBeans) {
+    public IgniteConfiguration setLifecycleBeans(LifecycleBean... lifecycleBeans) {
         this.lifecycleBeans = lifecycleBeans;
+
+        return this;
     }
 
     /**
@@ -1232,8 +1292,10 @@ public class IgniteConfiguration {
      * @param evtSpi Fully configured instance of {@link EventStorageSpi}.
      * @see IgniteConfiguration#getEventStorageSpi()
      */
-    public void setEventStorageSpi(EventStorageSpi evtSpi) {
+    public IgniteConfiguration setEventStorageSpi(EventStorageSpi evtSpi) {
         this.evtSpi = evtSpi;
+
+        return this;
     }
 
     /**
@@ -1252,8 +1314,10 @@ public class IgniteConfiguration {
      * @param discoSpi Fully configured instance of {@link DiscoverySpi}.
      * @see IgniteConfiguration#getDiscoverySpi()
      */
-    public void setDiscoverySpi(DiscoverySpi discoSpi) {
+    public IgniteConfiguration setDiscoverySpi(DiscoverySpi discoSpi) {
         this.discoSpi = discoSpi;
+
+        return this;
     }
 
     /**
@@ -1270,8 +1334,10 @@ public class IgniteConfiguration {
      *
      * @param segPlc Segmentation policy.
      */
-    public void setSegmentationPolicy(SegmentationPolicy segPlc) {
+    public IgniteConfiguration setSegmentationPolicy(SegmentationPolicy segPlc) {
         this.segPlc = segPlc;
+
+        return this;
     }
 
     /**
@@ -1294,8 +1360,10 @@ public class IgniteConfiguration {
      *
      * @param waitForSegOnStart {@code True} to wait for segment on start.
      */
-    public void setWaitForSegmentOnStart(boolean waitForSegOnStart) {
+    public IgniteConfiguration setWaitForSegmentOnStart(boolean waitForSegOnStart) {
         this.waitForSegOnStart = waitForSegOnStart;
+
+        return this;
     }
 
     /**
@@ -1321,8 +1389,10 @@ public class IgniteConfiguration {
      * @param allResolversPassReq {@code True} if all segmentation resolvers should
      *      succeed for node to be in the correct segment.
      */
-    public void setAllSegmentationResolversPassRequired(boolean allResolversPassReq) {
+    public IgniteConfiguration setAllSegmentationResolversPassRequired(boolean allResolversPassReq) {
         this.allResolversPassReq = allResolversPassReq;
+
+        return this;
     }
 
     /**
@@ -1342,8 +1412,10 @@ public class IgniteConfiguration {
      *
      * @param segResolveAttempts Segmentation resolve attempts.
      */
-    public void setSegmentationResolveAttempts(int segResolveAttempts) {
+    public IgniteConfiguration setSegmentationResolveAttempts(int segResolveAttempts) {
         this.segResolveAttempts = segResolveAttempts;
+
+        return this;
     }
 
     /**
@@ -1363,8 +1435,10 @@ public class IgniteConfiguration {
      *
      * @param segResolvers Segmentation resolvers.
      */
-    public void setSegmentationResolvers(SegmentationResolver... segResolvers) {
+    public IgniteConfiguration setSegmentationResolvers(SegmentationResolver... segResolvers) {
         this.segResolvers = segResolvers;
+
+        return this;
     }
 
     /**
@@ -1386,8 +1460,10 @@ public class IgniteConfiguration {
      *
      * @param segChkFreq Segment check frequency.
      */
-    public void setSegmentCheckFrequency(long segChkFreq) {
+    public IgniteConfiguration setSegmentCheckFrequency(long segChkFreq) {
         this.segChkFreq = segChkFreq;
+
+        return this;
     }
 
     /**
@@ -1406,8 +1482,10 @@ public class IgniteConfiguration {
      * @param commSpi Fully configured instance of {@link CommunicationSpi}.
      * @see IgniteConfiguration#getCommunicationSpi()
      */
-    public void setCommunicationSpi(CommunicationSpi commSpi) {
+    public IgniteConfiguration setCommunicationSpi(CommunicationSpi commSpi) {
         this.commSpi = commSpi;
+
+        return this;
     }
 
     /**
@@ -1431,8 +1509,10 @@ public class IgniteConfiguration {
      *      {@code null} if no SPI provided.
      * @see IgniteConfiguration#getCollisionSpi()
      */
-    public void setCollisionSpi(CollisionSpi colSpi) {
+    public IgniteConfiguration setCollisionSpi(CollisionSpi colSpi) {
         this.colSpi = colSpi;
+
+        return this;
     }
 
     /**
@@ -1451,8 +1531,10 @@ public class IgniteConfiguration {
      * @param deploySpi Fully configured instance of {@link DeploymentSpi}.
      * @see IgniteConfiguration#getDeploymentSpi()
      */
-    public void setDeploymentSpi(DeploymentSpi deploySpi) {
+    public IgniteConfiguration setDeploymentSpi(DeploymentSpi deploySpi) {
         this.deploySpi = deploySpi;
+
+        return this;
     }
 
     /**
@@ -1471,8 +1553,10 @@ public class IgniteConfiguration {
      * @param cpSpi Fully configured instance of {@link CheckpointSpi}.
      * @see IgniteConfiguration#getCheckpointSpi()
      */
-    public void setCheckpointSpi(CheckpointSpi... cpSpi) {
+    public IgniteConfiguration setCheckpointSpi(CheckpointSpi... cpSpi) {
         this.cpSpi = cpSpi;
+
+        return this;
     }
 
     /**
@@ -1492,8 +1576,10 @@ public class IgniteConfiguration {
      *      {@code null} if no SPI provided.
      * @see IgniteConfiguration#getFailoverSpi()
      */
-    public void setFailoverSpi(FailoverSpi... failSpi) {
+    public IgniteConfiguration setFailoverSpi(FailoverSpi... failSpi) {
         this.failSpi = failSpi;
+
+        return this;
     }
 
     /**
@@ -1534,8 +1620,10 @@ public class IgniteConfiguration {
      * @param discoStartupDelay Time in milliseconds for when nodes
      *      can be out-of-sync during startup.
      */
-    public void setDiscoveryStartupDelay(long discoStartupDelay) {
+    public IgniteConfiguration setDiscoveryStartupDelay(long discoStartupDelay) {
         this.discoStartupDelay = discoStartupDelay;
+
+        return this;
     }
 
     /**
@@ -1545,8 +1633,10 @@ public class IgniteConfiguration {
      *      {@code null} if no SPI provided.
      * @see IgniteConfiguration#getLoadBalancingSpi()
      */
-    public void setLoadBalancingSpi(LoadBalancingSpi... loadBalancingSpi) {
+    public IgniteConfiguration setLoadBalancingSpi(LoadBalancingSpi... loadBalancingSpi) {
         this.loadBalancingSpi = loadBalancingSpi;
+
+        return this;
     }
 
     /**
@@ -1556,8 +1646,10 @@ public class IgniteConfiguration {
      *      <tt>null</tt> if no SPI provided.
      * @see IgniteConfiguration#getSwapSpaceSpi()
      */
-    public void setSwapSpaceSpi(SwapSpaceSpi swapSpaceSpi) {
+    public IgniteConfiguration setSwapSpaceSpi(SwapSpaceSpi swapSpaceSpi) {
         this.swapSpaceSpi = swapSpaceSpi;
+
+        return this;
     }
 
     /**
@@ -1579,8 +1671,10 @@ public class IgniteConfiguration {
      * @param indexingSpi Fully configured instance of {@link IndexingSpi}.
      * @see IgniteConfiguration#getIndexingSpi()
      */
-    public void setIndexingSpi(IndexingSpi indexingSpi) {
+    public IgniteConfiguration setIndexingSpi(IndexingSpi indexingSpi) {
         this.indexingSpi = indexingSpi;
+
+        return this;
     }
 
     /**
@@ -1606,8 +1700,10 @@ public class IgniteConfiguration {
      *
      * @param addrRslvr Address resolver.
      */
-    public void setAddressResolver(AddressResolver addrRslvr) {
+    public IgniteConfiguration setAddressResolver(AddressResolver addrRslvr) {
         this.addrRslvr = addrRslvr;
+
+        return this;
     }
 
     /**
@@ -1615,8 +1711,10 @@ public class IgniteConfiguration {
      *
      * @param deployMode Task classes and resources sharing mode.
      */
-    public void setDeploymentMode(DeploymentMode deployMode) {
+    public IgniteConfiguration setDeploymentMode(DeploymentMode deployMode) {
         this.deployMode = deployMode;
+
+        return this;
     }
 
     /**
@@ -1635,8 +1733,10 @@ public class IgniteConfiguration {
      *
      * @param p2pMissedCacheSize Size of missed resources cache.
      */
-    public void setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize) {
+    public IgniteConfiguration setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize) {
         this.p2pMissedCacheSize = p2pMissedCacheSize;
+
+        return this;
     }
 
     /**
@@ -1666,8 +1766,10 @@ public class IgniteConfiguration {
      * @param cacheCfg Cache configurations.
      */
     @SuppressWarnings({"ZeroLengthArrayAllocation"})
-    public void setCacheConfiguration(CacheConfiguration... cacheCfg) {
+    public IgniteConfiguration setCacheConfiguration(CacheConfiguration... cacheCfg) {
         this.cacheCfg = cacheCfg == null ? new CacheConfiguration[0] : cacheCfg;
+
+        return this;
     }
 
     /**
@@ -1684,8 +1786,10 @@ public class IgniteConfiguration {
      *
      * @param clientMode Client mode flag.
      */
-    public void setClientMode(boolean clientMode) {
+    public IgniteConfiguration setClientMode(boolean clientMode) {
         this.clientMode = clientMode;
+
+        return this;
     }
 
     /**
@@ -1717,8 +1821,10 @@ public class IgniteConfiguration {
      * @param cacheSanityCheckEnabled {@code True} if cache sanity check is enabled.
      * @see #isCacheSanityCheckEnabled()
      */
-    public void setCacheSanityCheckEnabled(boolean cacheSanityCheckEnabled) {
+    public IgniteConfiguration setCacheSanityCheckEnabled(boolean cacheSanityCheckEnabled) {
         this.cacheSanityCheckEnabled = cacheSanityCheckEnabled;
+
+        return this;
     }
 
     /**
@@ -1744,8 +1850,10 @@ public class IgniteConfiguration {
      *
      * @param inclEvtTypes Include event types.
      */
-    public void setIncludeEventTypes(int... inclEvtTypes) {
+    public IgniteConfiguration setIncludeEventTypes(int... inclEvtTypes) {
         this.inclEvtTypes = inclEvtTypes;
+
+        return this;
     }
 
     /**
@@ -1754,8 +1862,10 @@ public class IgniteConfiguration {
      *
      * @param locHost Local IP address or host to bind to.
      */
-    public void setLocalHost(String locHost) {
+    public IgniteConfiguration setLocalHost(String locHost) {
         this.locHost = locHost;
+
+        return this;
     }
 
     /**
@@ -1792,8 +1902,10 @@ public class IgniteConfiguration {
      *
      * @param timeSrvPortBase Time server port base.
      */
-    public void setTimeServerPortBase(int timeSrvPortBase) {
+    public IgniteConfiguration setTimeServerPortBase(int timeSrvPortBase) {
         this.timeSrvPortBase = timeSrvPortBase;
+
+        return this;
     }
 
     /**
@@ -1810,8 +1922,10 @@ public class IgniteConfiguration {
      *
      * @param timeSrvPortRange Time server port range.
      */
-    public void setTimeServerPortRange(int timeSrvPortRange) {
+    public IgniteConfiguration setTimeServerPortRange(int timeSrvPortRange) {
         this.timeSrvPortRange = timeSrvPortRange;
+
+        return this;
     }
 
     /**
@@ -1833,8 +1947,10 @@ public class IgniteConfiguration {
      *
      * @param includeProps Array of system or environment property names to include into node attributes.
      */
-    public void setIncludeProperties(String... includeProps) {
+    public IgniteConfiguration setIncludeProperties(String... includeProps) {
         this.includeProps = includeProps;
+
+        return this;
     }
 
     /**
@@ -1859,8 +1975,10 @@ public class IgniteConfiguration {
      *
      * @param metricsLogFreq Frequency of metrics log print out.
      */
-    public void setMetricsLogFrequency(long metricsLogFreq) {
+    public IgniteConfiguration setMetricsLogFrequency(long metricsLogFreq) {
         this.metricsLogFreq = metricsLogFreq;
+
+        return this;
     }
 
     /**
@@ -1877,8 +1995,10 @@ public class IgniteConfiguration {
      *
      * @param igfsCfg IGFS configurations.
      */
-    public void setFileSystemConfiguration(FileSystemConfiguration... igfsCfg) {
+    public IgniteConfiguration setFileSystemConfiguration(FileSystemConfiguration... igfsCfg) {
         this.igfsCfg = igfsCfg;
+
+        return this;
     }
 
     /**
@@ -1895,8 +2015,10 @@ public class IgniteConfiguration {
      *
      * @param hadoopCfg Hadoop configuration.
      */
-    public void setHadoopConfiguration(HadoopConfiguration hadoopCfg) {
+    public IgniteConfiguration setHadoopConfiguration(HadoopConfiguration hadoopCfg) {
         this.hadoopCfg = hadoopCfg;
+
+        return this;
     }
 
     /**
@@ -1909,8 +2031,10 @@ public class IgniteConfiguration {
     /**
      * @param connectorCfg Connector configuration.
      */
-    public void setConnectorConfiguration(ConnectorConfiguration connectorCfg) {
+    public IgniteConfiguration setConnectorConfiguration(ConnectorConfiguration connectorCfg) {
         this.connectorCfg = connectorCfg;
+
+        return this;
     }
 
     /**
@@ -1927,8 +2051,10 @@ public class IgniteConfiguration {
      *
      * @param svcCfgs Configurations for services to be deployed on the grid.
      */
-    public void setServiceConfiguration(ServiceConfiguration... svcCfgs) {
+    public IgniteConfiguration setServiceConfiguration(ServiceConfiguration... svcCfgs) {
         this.svcCfgs = svcCfgs;
+
+        return this;
     }
 
     /**
@@ -1948,8 +2074,10 @@ public class IgniteConfiguration {
      *
      * @param lsnrs Pre-configured event listeners map.
      */
-    public void setLocalEventListeners(Map<IgnitePredicate<? extends Event>, int[]> lsnrs) {
+    public IgniteConfiguration setLocalEventListeners(Map<IgnitePredicate<? extends Event>, int[]> lsnrs) {
         this.lsnrs = lsnrs;
+
+        return this;
     }
 
     /**
@@ -1968,8 +2096,10 @@ public class IgniteConfiguration {
      * @param warmupClos Warmup closure to execute.
      * @see #getWarmupClosure()
      */
-    public void setWarmupClosure(IgniteInClosure<IgniteConfiguration> warmupClos) {
+    public IgniteConfiguration setWarmupClosure(IgniteInClosure<IgniteConfiguration> warmupClos) {
         this.warmupClos = warmupClos;
+
+        return this;
     }
 
     /**
@@ -1986,8 +2116,10 @@ public class IgniteConfiguration {
      *
      * @param txCfg Transactions configuration.
      */
-    public void setTransactionConfiguration(TransactionConfiguration txCfg) {
+    public IgniteConfiguration setTransactionConfiguration(TransactionConfiguration txCfg) {
         this.txCfg = txCfg;
+
+        return this;
     }
 
     /**
@@ -2000,8 +2132,10 @@ public class IgniteConfiguration {
     /**
      * @param pluginCfgs Plugin configurations.
      */
-    public void setPluginConfigurations(PluginConfiguration... pluginCfgs) {
+    public IgniteConfiguration setPluginConfigurations(PluginConfiguration... pluginCfgs) {
         this.pluginCfgs = pluginCfgs;
+
+        return this;
     }
 
     /**
@@ -2014,8 +2148,10 @@ public class IgniteConfiguration {
     /**
      * @param atomicCfg Atomic data structures configuration.
      */
-    public void setAtomicConfiguration(AtomicConfiguration atomicCfg) {
+    public IgniteConfiguration setAtomicConfiguration(AtomicConfiguration atomicCfg) {
         this.atomicCfg = atomicCfg;
+
+        return this;
     }
 
     /**
@@ -2025,8 +2161,10 @@ public class IgniteConfiguration {
      *
      * @param classLdr Class loader.
      */
-    public void setClassLoader(ClassLoader classLdr) {
+    public IgniteConfiguration setClassLoader(ClassLoader classLdr) {
         this.classLdr = classLdr;
+
+        return this;
     }
 
     /**


Mime
View raw message