ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [04/50] [abbrv] ignite git commit: IGNITE-2934: Partial deprecation of methods inside GridFunc.
Date Mon, 11 Apr 2016 14:25:31 GMT
IGNITE-2934: Partial deprecation of methods inside GridFunc.


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

Branch: refs/heads/ignite-1786
Commit: 10603bf7e1528035803b69543c881aaee9d2f064
Parents: 244441a
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Apr 1 16:12:53 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Apr 1 16:12:53 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/GridLoggerProxy.java |   3 +-
 .../apache/ignite/internal/IgniteKernal.java    |  31 ++++--
 .../deployment/GridDeploymentCommunication.java |   3 +-
 .../discovery/GridDiscoveryManager.java         |   2 +-
 .../processors/cache/GridCacheAdapter.java      |   2 +-
 .../processors/cache/GridCacheContext.java      |   2 +-
 .../cache/GridCacheEvictionManager.java         |  12 ++-
 .../processors/cache/GridCacheLogger.java       |   3 +-
 .../GridCachePartitionExchangeManager.java      |  14 ++-
 .../processors/cache/GridCacheSwapManager.java  |  14 +--
 .../GridDhtPartitionsExchangeFuture.java        |  27 ++++-
 .../near/GridNearTxPrepareFutureAdapter.java    |   2 +-
 .../cache/query/GridCacheQueryManager.java      |   5 +-
 .../jdbc/GridCacheQueryJdbcValidationTask.java  |   3 +-
 .../store/GridCacheStoreManagerAdapter.java     |   4 +-
 .../cache/transactions/IgniteTxManager.java     |   2 +-
 .../closure/GridClosureProcessor.java           |  26 ++++-
 .../datastructures/GridCacheAtomicLongImpl.java |   3 +-
 .../GridCacheAtomicReferenceImpl.java           |   2 +-
 .../GridCacheAtomicSequenceImpl.java            |   3 +-
 .../GridCacheAtomicStampedImpl.java             |   3 +-
 .../GridCacheCountDownLatchImpl.java            |   3 +-
 .../datastructures/GridCacheQueueProxy.java     |   3 +-
 .../datastructures/GridCacheSemaphoreImpl.java  |   3 +-
 .../datastructures/GridCacheSetProxy.java       |   3 +-
 .../internal/processors/igfs/IgfsProcessor.java |  10 +-
 .../processors/job/GridJobProcessor.java        |  20 ++--
 .../handlers/task/GridTaskCommandHandler.java   |   2 +-
 .../service/GridServiceProcessor.java           |   3 +-
 .../internal/util/GridExecutionStatistics.java  | 106 -------------------
 .../ignite/internal/util/GridLeanSet.java       |   1 +
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |   6 +-
 .../ignite/internal/util/lang/GridFunc.java     |  92 +++++++++++++++-
 .../ignite/internal/util/lang/GridTuple.java    |   2 -
 .../ignite/internal/util/lang/GridTuple3.java   |   2 -
 .../ignite/internal/util/lang/GridTuple4.java   |   2 -
 .../ignite/internal/util/lang/GridTuple5.java   |   2 -
 .../ignite/internal/util/lang/GridTuple6.java   |   2 -
 .../ignite/internal/util/lang/GridTupleV.java   |   1 +
 .../visor/igfs/VisorIgfsProfilerTask.java       |  20 ++--
 .../jobstealing/JobStealingCollisionSpi.java    |  14 ++-
 .../communication/tcp/TcpCommunicationSpi.java  |  15 +--
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  19 +++-
 .../ignite/jvmtest/ConcurrentMapTest.java       |   3 +-
 .../ignite/testframework/GridTestUtils.java     |   5 +-
 .../fs/IgniteHadoopIgfsSecondaryFileSystem.java |  10 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   6 +-
 .../processors/query/h2/sql/GridSqlSelect.java  |   2 +-
 49 files changed, 291 insertions(+), 238 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/GridLoggerProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridLoggerProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/GridLoggerProxy.java
index f6bddca..295ee1c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridLoggerProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridLoggerProxy.java
@@ -26,7 +26,6 @@ import java.io.ObjectStreamException;
 import java.util.Collections;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
@@ -45,7 +44,7 @@ public class GridLoggerProxy implements IgniteLogger, LifecycleAware, Externaliz
     /** */
     private static ThreadLocal<IgniteBiTuple<String, Object>> stash = new ThreadLocal<IgniteBiTuple<String, Object>>() {
         @Override protected IgniteBiTuple<String, Object> initialValue() {
-            return F.t2();
+            return new IgniteBiTuple<>();
         }
     };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 21fbc47..cec4b74 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -572,8 +572,16 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
     @Override public List<String> getLifecycleBeansFormatted() {
         LifecycleBean[] beans = cfg.getLifecycleBeans();
 
-        return F.isEmpty(beans) ? Collections.<String>emptyList() :
-            (List<String>)F.transform(beans, F.<LifecycleBean>string());
+        if (F.isEmpty(beans))
+            return Collections.emptyList();
+        else {
+            List<String> res = new ArrayList<>(beans.length);
+
+            for (LifecycleBean bean : beans)
+                res.add(String.valueOf(bean));
+
+            return res;
+        }
     }
 
     /**
@@ -2241,17 +2249,20 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
     private Iterable<Object> lifecycleAwares(IgniteConfiguration cfg) {
         Collection<Object> objs = new ArrayList<>();
 
-        if (!F.isEmpty(cfg.getLifecycleBeans()))
-            F.copy(objs, cfg.getLifecycleBeans());
+        if (cfg.getLifecycleBeans() != null)
+            Collections.addAll(objs, cfg.getLifecycleBeans());
 
-        if (!F.isEmpty(cfg.getSegmentationResolvers()))
-            F.copy(objs, cfg.getSegmentationResolvers());
+        if (cfg.getSegmentationResolvers() != null)
+            Collections.addAll(objs, cfg.getSegmentationResolvers());
 
-        if (cfg.getConnectorConfiguration() != null)
-            F.copy(objs, cfg.getConnectorConfiguration().getMessageInterceptor(),
-                cfg.getConnectorConfiguration().getSslContextFactory());
+        if (cfg.getConnectorConfiguration() != null) {
+            objs.add(cfg.getConnectorConfiguration().getMessageInterceptor());
+            objs.add(cfg.getConnectorConfiguration().getSslContextFactory());
+        }
 
-        F.copy(objs, cfg.getMarshaller(), cfg.getGridLogger(), cfg.getMBeanServer());
+        objs.add(cfg.getMarshaller());
+        objs.add(cfg.getGridLogger());
+        objs.add(cfg.getMBeanServer());
 
         return objs;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
index 76bd6e3..d4b3568 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
@@ -35,7 +35,6 @@ import org.apache.ignite.internal.util.GridBusyLock;
 import org.apache.ignite.internal.util.GridByteArrayList;
 import org.apache.ignite.internal.util.lang.GridTuple;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteNotPeerDeployable;
 import org.apache.ignite.lang.IgniteUuid;
@@ -380,7 +379,7 @@ class GridDeploymentCommunication {
 
         final Object qryMux = new Object();
 
-        final GridTuple<GridDeploymentResponse> res = F.t1();
+        final GridTuple<GridDeploymentResponse> res = new GridTuple<>();
 
         GridLocalEventListener discoLsnr = new GridLocalEventListener() {
             @Override public void onEvent(Event evt) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index a254b73..5b56d38 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -1989,7 +1989,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         ) {
             assert node != null : data;
 
-            evts.add(F.t(type, topVer, node, topSnapshot, data));
+            evts.add(new GridTuple5<>(type, topVer, node, topSnapshot, data));
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index cfef152..936e9cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -177,7 +177,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
     private static final ThreadLocal<IgniteBiTuple<String, String>> stash = new ThreadLocal<IgniteBiTuple<String,
         String>>() {
         @Override protected IgniteBiTuple<String, String> initialValue() {
-            return F.t2();
+            return new IgniteBiTuple<>();
         }
     };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index e948c8e..d159afa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -125,7 +125,7 @@ public class GridCacheContext<K, V> implements Externalizable {
     /** Deserialization stash. */
     private static final ThreadLocal<IgniteBiTuple<String, String>> stash = new ThreadLocal<IgniteBiTuple<String, String>>() {
         @Override protected IgniteBiTuple<String, String> initialValue() {
-            return F.t2();
+            return new IgniteBiTuple<>();
         }
     };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index ae4a362..b1a57a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -1984,11 +1984,15 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
                 if (log.isDebugEnabled())
                     log.debug("Building eviction future result [fut=" + this + ", timedOut=" + timedOut + ']');
 
-                boolean err = F.forAny(resMap.values(), new P1<GridCacheEvictionResponse>() {
-                    @Override public boolean apply(GridCacheEvictionResponse res) {
-                        return res.evictError();
+                boolean err = false;
+
+                for (GridCacheEvictionResponse res : resMap.values()) {
+                    if (res.evictError()) {
+                        err = true;
+
+                        break;
                     }
-                });
+                }
 
                 if (err) {
                     Collection<UUID> ids = F.view(resMap.keySet(), new P1<UUID>() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheLogger.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheLogger.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheLogger.java
index 75547fb..7348c67 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheLogger.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheLogger.java
@@ -25,7 +25,6 @@ import java.io.ObjectOutput;
 import java.io.ObjectStreamException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
@@ -43,7 +42,7 @@ class GridCacheLogger implements IgniteLogger, Externalizable {
     private static ThreadLocal<IgniteBiTuple<String, GridCacheContext>> stash =
         new ThreadLocal<IgniteBiTuple<String, GridCacheContext>>() {
             @Override protected IgniteBiTuple<String, GridCacheContext> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 6de10c5..462c511 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Comparator;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.NavigableMap;
@@ -1269,9 +1270,16 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                         timeout = cctx.gridConfig().getNetworkTimeout();
 
                     // After workers line up and before preloading starts we initialize all futures.
-                    if (log.isDebugEnabled())
-                        log.debug("Before waiting for exchange futures [futs" +
-                            F.view(exchFuts.values(), F.unfinishedFutures()) + ", worker=" + this + ']');
+                    if (log.isDebugEnabled()) {
+                        Collection<IgniteInternalFuture> unfinished = new HashSet<>();
+
+                        for (GridDhtPartitionsExchangeFuture fut : exchFuts.values()) {
+                            if (!fut.isDone())
+                                unfinished.add(fut);
+                        }
+
+                        log.debug("Before waiting for exchange futures [futs" + unfinished + ", worker=" + this + ']');
+                    }
 
                     // Take next exchange future.
                     exchFut = poll(futQ, timeout, this);

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index d50bf0b..7901105 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -714,8 +714,8 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
         if (!swapEnabled)
             return null;
 
-        final GridTuple<GridCacheSwapEntry> t = F.t1();
-        final GridTuple<IgniteCheckedException> err = F.t1();
+        final GridTuple<GridCacheSwapEntry> t = new GridTuple<>();
+        final GridTuple<IgniteCheckedException> err = new GridTuple<>();
 
         SwapKey swapKey = new SwapKey(key,
             part,
@@ -1003,7 +1003,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
             }
         }
 
-        final GridTuple<IgniteCheckedException> err = F.t1();
+        final GridTuple<IgniteCheckedException> err = new GridTuple<>();
 
         swapMgr.removeAll(spaceName,
             unprocessedKeys,
@@ -1620,7 +1620,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
         assert primary || backup;
 
         if (!offheapEnabled)
-            return F.emptyIterator();
+            return new GridEmptyIterator<>();
 
         if (primary && backup)
             return keyIterator(offheap.iterator(spaceName));
@@ -1645,7 +1645,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
         assert primary || backup;
 
         if (!swapEnabled)
-            return F.emptyIterator();
+            return new GridEmptyIterator<>();
 
         if (primary && backup)
             return keyIterator(cctx.gridSwap().rawIterator(spaceName));
@@ -2044,7 +2044,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
         assert primary || backup;
 
         if (!swapEnabled)
-            return F.emptyIterator();
+            return new GridEmptyIterator<>();
 
         if (primary && backup)
             return cacheEntryIterator(this.<K, V>lazySwapIterator());
@@ -2076,7 +2076,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
         assert primary || backup;
 
         if (!offheapEnabled)
-            return F.emptyIterator();
+            return new GridEmptyIterator<>();
 
         if (primary && backup)
             return cacheEntryIterator(this.<K, V>lazyOffHeapIterator());

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 68a05e4..d52ad72 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -1611,8 +1611,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                             try {
                                 U.warn(log,
                                     "Retrying preload partition exchange due to timeout [done=" + isDone() +
-                                        ", dummy=" + dummy + ", exchId=" + exchId + ", rcvdIds=" + F.id8s(rcvdIds) +
-                                        ", rmtIds=" + F.id8s(rmtIds) + ", remaining=" + F.id8s(remaining()) +
+                                        ", dummy=" + dummy + ", exchId=" + exchId + ", rcvdIds=" + id8s(rcvdIds) +
+                                        ", rmtIds=" + id8s(rmtIds) + ", remaining=" + id8s(remaining()) +
                                         ", init=" + init + ", initFut=" + initFut.isDone() +
                                         ", ready=" + ready + ", replied=" + replied + ", added=" + added +
                                         ", oldest=" + U.id8(oldestNode.get().id()) + ", oldestOrder=" +
@@ -1647,6 +1647,29 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
         return F.lose(rmtIds, true, rcvdIds);
     }
 
+    /**
+     * Convenient utility method that returns collection of node ID8s for a given
+     * collection of node IDs. ID8 is a shorter string representation of node ID,
+     * mainly the first 8 characters.
+     * <p>
+     * Note that this method doesn't create a new collection but simply iterates
+     * over the input one.
+     *
+     * @param ids Collection of nodeIds.
+     * @return Collection of node IDs for given collection of grid nodes.
+     */
+    private static Collection<String> id8s(@Nullable Collection<UUID> ids) {
+        if (ids == null || ids.isEmpty())
+            return Collections.emptyList();
+
+        Collection<String> res = new ArrayList<>(ids.size());
+
+        for (UUID id : ids)
+            res.add(U.id8(id));
+
+        return res;
+    }
+
     /** {@inheritDoc} */
     @Override public int compareTo(GridDhtPartitionsExchangeFuture fut) {
         return exchId.compareTo(fut.exchId);

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFutureAdapter.java
index ce4d2e0..2acc139 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFutureAdapter.java
@@ -155,7 +155,7 @@ public abstract class GridNearTxPrepareFutureAdapter extends
         Map<UUID, Collection<UUID>> map = txMapping.transactionNodes();
 
         if (map.size() == 1) {
-            Map.Entry<UUID, Collection<UUID>> entry = F.firstEntry(map);
+            Map.Entry<UUID, Collection<UUID>> entry = map.entrySet().iterator().next();
 
             assert entry != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index df95e2e..401b61b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -81,6 +81,7 @@ import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
 import org.apache.ignite.internal.processors.task.GridInternal;
 import org.apache.ignite.internal.util.GridCloseableIteratorAdapter;
 import org.apache.ignite.internal.util.GridEmptyCloseableIterator;
+import org.apache.ignite.internal.util.GridEmptyIterator;
 import org.apache.ignite.internal.util.GridLeanMap;
 import org.apache.ignite.internal.util.GridSpiCloseableIteratorWrapper;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
@@ -831,7 +832,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
             if (part == null || cctx.isLocal())
                 keyIter = backups ? prj.keySetx().iterator() : prj.primaryKeySet().iterator();
             else if (part < 0 || part >= cctx.affinity().partitions())
-                keyIter = F.emptyIterator();
+                keyIter = new GridEmptyIterator<>();
             else {
                 final GridDhtCacheAdapter dht = cctx.isNear() ? cctx.near().dht() : cctx.dht();
 
@@ -1917,7 +1918,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
 
             // Get metadata from remote nodes.
             if (!nodes.isEmpty())
-                rmtFut = cctx.closures().callAsyncNoFailover(BROADCAST, F.asSet(job), nodes, true);
+                rmtFut = cctx.closures().callAsyncNoFailover(BROADCAST, Collections.singleton(job), nodes, true);
 
             // Get local metadata.
             IgniteInternalFuture<Collection<CacheSqlMetadata>> locFut = cctx.closures().callLocalSafe(job, true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcValidationTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcValidationTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcValidationTask.java
index 717c82c..692d01c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcValidationTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcValidationTask.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.query.jdbc;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.cluster.ClusterNode;
@@ -42,7 +43,7 @@ public class GridCacheQueryJdbcValidationTask extends ComputeTaskSplitAdapter<St
     @Override protected Collection<? extends ComputeJob> split(int gridSize,
         @Nullable final String cacheName) {
         // Register big data usage.
-        return F.asSet(new ComputeJobAdapter() {
+        return Collections.singleton(new ComputeJobAdapter() {
             @IgniteInstanceResource
             private Ignite ignite;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
index 7ffebbd..467f4b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
@@ -44,6 +44,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.util.GridEmptyIterator;
 import org.apache.ignite.internal.util.GridLeanMap;
 import org.apache.ignite.internal.util.GridSetWrapper;
 import org.apache.ignite.internal.util.lang.GridInClosure3;
@@ -60,7 +61,6 @@ import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiInClosure;
 import org.apache.ignite.lang.IgniteBiTuple;
-import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lifecycle.LifecycleAware;
 import org.apache.ignite.transactions.Transaction;
 import org.jetbrains.annotations.NotNull;
@@ -1064,7 +1064,7 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
         /** {@inheritDoc} */
         @NotNull @Override public Iterator<Cache.Entry<?, ?>> iterator() {
             if (cleared)
-                return F.emptyIterator();
+                return new GridEmptyIterator<>();
 
             final Iterator<Map.Entry<?, IgniteBiTuple<?, GridCacheVersion>>> it0 = (Iterator)map.entrySet().iterator();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index 28a7cc0..4e20425 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -837,7 +837,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
             }
         }
 
-        return F.pair(
+        return new IgnitePair<>(
             committed == null ? Collections.<GridCacheVersion>emptyList() : committed,
             rolledback == null ? Collections.<GridCacheVersion>emptyList() : rolledback);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
index c6883dc..4719880 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
@@ -21,6 +21,7 @@ import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -1106,6 +1107,25 @@ public class GridClosureProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Get collection of actual results.
+     *
+     * @param res Initial results.
+     * @return Converted results.
+     */
+    private static <R> Collection<R> jobResults(List<ComputeJobResult> res) {
+        if (res == null)
+            return Collections.emptyList();
+        else {
+            List<R> res0 = new ArrayList<>(res.size());
+
+            for (int i = 0; i < res.size(); i++)
+                res0.add(res.get(i).<R>getData());
+
+            return res0;
+        }
+    }
+
+    /**
      *
      */
     private class JobMapper {
@@ -1462,7 +1482,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
         /** {@inheritDoc} */
         @Override public Collection<R> reduce(List<ComputeJobResult> res) {
-            return F.jobResults(res);
+            return jobResults(res);
         }
     }
 
@@ -1602,7 +1622,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
         /** {@inheritDoc} */
         @Override public Collection<R> reduce(List<ComputeJobResult> res) throws IgniteException {
-            return F.jobResults(res);
+            return jobResults(res);
         }
     }
 
@@ -1713,7 +1733,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
         /** {@inheritDoc} */
         @Override public Collection<R> reduce(List<ComputeJobResult> res) {
-            return F.jobResults(res);
+            return jobResults(res);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
index 64fbcde..dfd2122 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
@@ -30,7 +30,6 @@ import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -51,7 +50,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx, Ext
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
index e044138..b6cbf3b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
@@ -51,7 +51,7 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
index 956265b..7474f46 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
@@ -36,7 +36,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -60,7 +59,7 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
index f7a82a9..6ac303c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
@@ -32,7 +32,6 @@ import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.util.F0;
 import org.apache.ignite.internal.util.tostring.GridToStringBuilder;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
@@ -54,7 +53,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
index c984ab3..41cc548 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
@@ -33,7 +33,6 @@ import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -55,7 +54,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
index c869743..e38c772 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
@@ -32,7 +32,6 @@ import org.apache.ignite.IgniteQueue;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheGateway;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
@@ -51,7 +50,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSemaphoreImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSemaphoreImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSemaphoreImpl.java
index 2c60e8b..c365f9d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSemaphoreImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSemaphoreImpl.java
@@ -36,7 +36,6 @@ import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -62,7 +61,7 @@ public final class GridCacheSemaphoreImpl implements GridCacheSemaphoreEx, Exter
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
index 219bb4d..0eb6307 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
@@ -32,7 +32,6 @@ import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheGateway;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
@@ -51,7 +50,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
     private static final ThreadLocal<IgniteBiTuple<GridKernalContext, String>> stash =
         new ThreadLocal<IgniteBiTuple<GridKernalContext, String>>() {
             @Override protected IgniteBiTuple<GridKernalContext, String> initialValue() {
-                return F.t2();
+                return new IgniteBiTuple<>();
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
index 778de99..f152170 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
@@ -36,7 +36,6 @@ import org.apache.ignite.internal.IgniteNodeAttributes;
 import org.apache.ignite.internal.processors.query.GridQueryProcessor;
 import org.apache.ignite.internal.util.ipc.IpcServerEndpoint;
 import org.apache.ignite.internal.util.typedef.C1;
-import org.apache.ignite.internal.util.typedef.CI1;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -138,11 +137,10 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
 
         final Map<String, CacheConfiguration> cacheCfgs = new HashMap<>();
 
-        F.forEach(gridCfg.getCacheConfiguration(), new CI1<CacheConfiguration>() {
-            @Override public void apply(CacheConfiguration c) {
-                cacheCfgs.put(c.getName(), c);
-            }
-        });
+        assert gridCfg.getCacheConfiguration() != null;
+
+        for (CacheConfiguration ccfg : gridCfg.getCacheConfiguration())
+            cacheCfgs.put(ccfg.getName(), ccfg);
 
         Collection<IgfsAttributes> attrVals = new ArrayList<>();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
index 906d298..a2e9e33 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
@@ -66,8 +66,6 @@ import org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashMap;
 import org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashSet;
 import org.apache.ignite.internal.util.GridConcurrentHashSet;
 import org.apache.ignite.internal.util.GridSpinReadWriteLock;
-import org.apache.ignite.internal.util.typedef.CI1;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.P1;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -433,7 +431,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
             throw new IgniteCheckedException("Node that originated task execution has left grid: " + taskNodeId);
 
         // Tuple: error message-response.
-        final IgniteBiTuple<String, GridJobSiblingsResponse> t = F.t2();
+        final IgniteBiTuple<String, GridJobSiblingsResponse> t = new IgniteBiTuple<>();
 
         final Lock lock = new ReentrantLock();
         final Condition cond = lock.newCondition();
@@ -609,19 +607,15 @@ public class GridJobProcessor extends GridProcessorAdapter {
             // If we don't have jobId then we have to iterate
             if (jobId == null) {
                 if (!jobAlwaysActivate) {
-                    // If job gets removed from passive jobs it never gets activated.
-                    F.forEach(passiveJobs.values(), new CI1<GridJobWorker>() {
-                        @Override public void apply(GridJobWorker job) {
+                    for (GridJobWorker job : passiveJobs.values()) {
+                        if (idsMatch.apply(job))
                             cancelPassiveJob(job);
-                        }
-                    }, idsMatch);
+                    }
                 }
-
-                F.forEach(activeJobs.values(), new CI1<GridJobWorker>() {
-                    @Override public void apply(GridJobWorker job) {
+                for (GridJobWorker job : activeJobs.values()) {
+                    if (idsMatch.apply(job))
                         cancelActiveJob(job, sys);
-                    }
-                }, idsMatch);
+                }
             }
             else {
                 if (!jobAlwaysActivate) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
index 6937196..2749e96 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
@@ -420,7 +420,7 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
             return F.t("Task result holder has left grid: " + resHolderId, null);
 
         // Tuple: error message-response.
-        final IgniteBiTuple<String, GridTaskResultResponse> t = F.t2();
+        final IgniteBiTuple<String, GridTaskResultResponse> t = new IgniteBiTuple<>();
 
         final Lock lock = new ReentrantLock();
         final Condition cond = lock.newCondition();

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 2d8488b..e58b862 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -62,6 +62,7 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.task.GridInternal;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
+import org.apache.ignite.internal.util.GridEmptyIterator;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.future.GridCompoundFuture;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
@@ -1073,7 +1074,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                 CU.oldestAliveCacheServerNode(cache.context().shared(), AffinityTopologyVersion.NONE);
 
             if (oldestSrvNode == null)
-                return F.emptyIterator();
+                return new GridEmptyIterator<>();
 
             GridCacheQueryManager qryMgr = cache.context().queries();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/util/GridExecutionStatistics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridExecutionStatistics.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridExecutionStatistics.java
deleted file mode 100644
index a23fe28..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridExecutionStatistics.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiTuple;
-import org.jsr166.ConcurrentHashMap8;
-
-/**
- * Accumulates execution statistics for named pieces of code.
- */
-public class GridExecutionStatistics {
-    /** */
-    private String name;
-
-    /** Map of execution counters. */
-    private ConcurrentMap<String, AtomicInteger> cntMap = new ConcurrentHashMap8<>();
-
-    /** Map of execution durations. */
-    private ConcurrentMap<String, AtomicLong> durationMap = new ConcurrentHashMap8<>();
-
-    /** Execution start time for the current thread. */
-    private ThreadLocal<IgniteBiTuple<String, Long>> startTime = new ThreadLocal<IgniteBiTuple<String, Long>>() {
-        @Override protected IgniteBiTuple<String, Long> initialValue() {
-            return F.t(null, 0L);
-        }
-    };
-
-    /**
-     * @param name Statistics name.
-     */
-    public GridExecutionStatistics(String name) {
-        this.name = name;
-    }
-
-    /**
-     * @param name Execution name.
-     */
-    public void watchExecution(String name) {
-        assert name != null;
-
-        startTime.get().put(name, U.currentTimeMillis());
-    }
-
-    /**
-     * Stop watching execution started previously in the same thread.
-     */
-    public void stopWatching() {
-        String name = startTime.get().get1();
-
-        long time = startTime.get().get2();
-
-        AtomicInteger cnt = F.addIfAbsent(cntMap, name, F.newAtomicInt());
-
-        assert cnt != null;
-
-        cnt.incrementAndGet();
-
-        AtomicLong d = F.addIfAbsent(durationMap, name, F.newAtomicLong());
-
-        assert d != null;
-
-        d.addAndGet(U.currentTimeMillis() - time);
-    }
-
-    /**
-     * Prints statistics.
-     */
-    public void print() {
-        X.println("*** Execution statistics: " + name);
-
-        for (Map.Entry<String, AtomicInteger> e : cntMap.entrySet()) {
-            int cnt = e.getValue().get();
-
-            assert cnt > 0;
-
-            long totalDuration = durationMap.get(e.getKey()).get();
-
-            long avgDuration = totalDuration / cnt;
-
-            X.println("\t" + e.getKey() + "->[executions=" + cnt +
-                ", average duration=" + avgDuration + ", total duration=" + totalDuration + "]");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/util/GridLeanSet.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLeanSet.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLeanSet.java
index e2283e7..1cfffd5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLeanSet.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLeanSet.java
@@ -57,6 +57,7 @@ public class GridLeanSet<E> extends GridSetWrapper<E> implements Cloneable {
      *
      * @param c Collection to add.
      */
+    @Deprecated
     public GridLeanSet(Collection<E> c) {
         super(new GridLeanMap<>(F.zip(c, VAL)));
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 7b2414f..ef5566d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -5836,7 +5836,7 @@ public abstract class IgniteUtils {
                 Iterable<Field> fields = cached ? tup.get2() : Arrays.asList(cls.getDeclaredFields());
 
                 if (!cached) {
-                    tup = F.t2();
+                    tup = new IgniteBiTuple<>();
 
                     tup.set1(cls);
                 }
@@ -8560,7 +8560,7 @@ public abstract class IgniteUtils {
             throw new IgniteCheckedException("Addresses can not be resolved [addr=" + addrs +
                 ", hostNames=" + hostNames + ']');
 
-        return F.viewListReadOnly(res, F.<InetAddress>identity());
+        return Collections.unmodifiableList(res);
     }
 
     /**
@@ -8607,7 +8607,7 @@ public abstract class IgniteUtils {
             res.add(new InetSocketAddress(addr, port));
         }
 
-        return F.viewListReadOnly(res, F.<InetSocketAddress>identity());
+        return Collections.unmodifiableList(res);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/10603bf7/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
index e7b420e..6fd6482 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
@@ -381,8 +381,10 @@ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint {
             long idx = tokIdxGen.get();
 
             if (tokIdxGen.compareAndSet(idx, idx + 2))
-                return F.pair(new File(tokDir, TOKEN_FILE_NAME + idx + "-" + pid + "-" + size).getAbsolutePath(),
-                    new File(tokDir, TOKEN_FILE_NAME + (idx + 1) + "-" + pid + "-" + size).getAbsolutePath());
+                return new IgnitePair<>(
+                    new File(tokDir, TOKEN_FILE_NAME + idx + "-" + pid + "-" + size).getAbsolutePath(),
+                    new File(tokDir, TOKEN_FILE_NAME + (idx + 1) + "-" + pid + "-" + size).getAbsolutePath()
+                );
         }
     }
 


Mime
View raw message