ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/44] incubator-ignite git commit: IGNITE-36 Removed GridMetadataAware interface.
Date Fri, 23 Jan 2015 13:05:37 GMT
IGNITE-36 Removed GridMetadataAware interface.


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

Branch: refs/heads/ignite-107
Commit: 1bbd19c933fdd2089dc65ec721574f6dcaff8b94
Parents: 1812040
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Tue Dec 16 09:45:03 2014 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Fri Dec 19 16:29:31 2014 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/cluster/ClusterNode.java  |  39 +++-
 .../ignite/cluster/ClusterNodeLocalMap.java     |   3 +-
 .../ignite/compute/ComputeJobSibling.java       |   3 +-
 .../ignite/compute/ComputeLoadBalancer.java     |   3 +-
 .../ignite/logger/java/IgniteJavaLogger.java    |   4 +-
 .../org/gridgain/grid/GridMetadataAware.java    | 179 -------------------
 .../org/gridgain/grid/cache/GridCacheEntry.java |  77 +++++++-
 .../org/gridgain/grid/cache/GridCacheTx.java    |  33 +++-
 .../grid/cache/store/GridCacheStore.java        |   5 +-
 .../grid/kernal/ClusterNodeLocalMapImpl.java    |  80 ---------
 .../grid/kernal/GridJobContextImpl.java         |   4 +-
 .../grid/kernal/GridJobSiblingImpl.java         |   3 +-
 .../gridgain/grid/kernal/GridKernalContext.java |   3 +-
 .../grid/kernal/GridKernalContextImpl.java      |   4 +-
 .../gridgain/grid/kernal/GridLoggerProxy.java   |   5 +-
 .../kernal/executor/GridExecutorService.java    |   4 +-
 .../loadbalancer/GridLoadBalancerAdapter.java   |   4 +-
 .../processors/cache/GridCacheAdapter.java      |   4 +-
 .../processors/cache/GridCacheEntryEx.java      |  85 ++++++++-
 .../processors/cache/GridCacheEntryImpl.java    |  54 +-----
 .../cache/GridCacheEvictionEntry.java           |  36 ----
 .../cache/GridCacheFilterEvaluationEntry.java   |  36 ----
 .../processors/cache/GridCacheLogger.java       |   3 +-
 .../processors/cache/GridCacheMapEntry.java     |  88 +--------
 .../processors/cache/GridCacheTxProxyImpl.java  |  59 ------
 .../GridPartitionedCacheEntryImpl.java          | 147 ---------------
 .../cache/query/GridCacheQueryManager.java      |  37 ----
 .../GridCacheContinuousQueryEntry.java          |  50 ------
 .../java/org/gridgain/grid/util/GridUtils.java  |  19 --
 .../grid/util/lang/GridComputeJobWrapper.java   |  14 +-
 .../org/gridgain/grid/util/lang/GridFunc.java   | 146 ---------------
 .../util/lang/GridMetadataAwareAdapter.java     | 159 ++++++++++++----
 .../org/gridgain/grid/GridTestJobContext.java   |   2 +-
 .../gridgain/grid/lang/GridTupleSelfTest.java   |  85 ---------
 .../junits/logger/GridTestLog4jLogger.java      |   2 +-
 .../gridgain/grid/logger/jcl/GridJclLogger.java |   2 +-
 .../ignite/logger/log4j/IgniteLog4jLogger.java  |   2 +-
 .../processors/schedule/ScheduleFutureImpl.java |   5 +-
 .../grid/logger/slf4j/GridSlf4jLogger.java      |   2 +-
 .../java/org/gridgain/grid/GridSpringBean.java  |   2 +-
 40 files changed, 381 insertions(+), 1111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
index a0dd196..72b2840 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java
@@ -11,11 +11,11 @@ package org.apache.ignite.cluster;
 
 import org.apache.ignite.IgniteCluster;
 import org.apache.ignite.product.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
+import java.util.concurrent.*;
 
 /**
  * Interface representing a single grid node. Use {@link #attribute(String)} or
@@ -99,7 +99,7 @@ import java.util.*;
  * that comes with JDK as it also provides ability to view any node parameter
  * as a graph.
  */
-public interface ClusterNode extends GridMetadataAware {
+public interface ClusterNode {
     /**
      * Gets globally unique node ID. A new ID is generated every time a node restarts.
      *
@@ -246,4 +246,39 @@ public interface ClusterNode extends GridMetadataAware {
      * @return {@code True} if this node is a client node, {@code false} otherwise.
      */
     public boolean isClient();
+
+    /**
+     * Adds a new metadata.
+     *
+     * @param name Metadata name.
+     * @param val Metadata value.
+     * @param <V> Type of the value.
+     * @return Metadata previously associated with given name, or
+     *      {@code null} if there was none.
+     */
+    @Nullable public <V> V addMeta(String name, V val);
+
+    /**
+     * Adds given metadata value only if it was absent.
+     *
+     * @param name Metadata name.
+     * @param c Factory closure to produce value to add if it's not attached already.
+     *      Not that unlike {@link #addMeta(String, Object)} method the factory closure will
+     *      not be called unless the value is required and therefore value will only be created
+     *      when it is actually needed. If {@code null} and metadata value is missing - {@code null}
+     *      will be returned from this method.
+     * @param <V> Type of the value.
+     * @return The value of the metadata after execution of this method.
+     */
+    @Nullable public <V> V addMetaIfAbsent(String name, @Nullable Callable<V> c);
+
+
+    /**
+     * Gets metadata by name.
+     *
+     * @param name Metadata name.
+     * @param <V> Type of the value.
+     * @return Metadata value or {@code null}.
+     */
+    @Nullable public <V> V meta(String name);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNodeLocalMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNodeLocalMap.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNodeLocalMap.java
index 770d08f..84d65b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNodeLocalMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNodeLocalMap.java
@@ -9,7 +9,6 @@
 
 package org.apache.ignite.cluster;
 
-import org.gridgain.grid.*;
 import org.jetbrains.annotations.*;
 import java.util.concurrent.*;
 
@@ -26,7 +25,7 @@ import java.util.concurrent.*;
  * <p>
  * You can get an instance of {@code GridNodeLocalMap} by calling {@link org.apache.ignite.IgniteCluster#nodeLocalMap()} method.
  */
-public interface ClusterNodeLocalMap<K, V> extends ConcurrentMap<K, V>, GridMetadataAware {
+public interface ClusterNodeLocalMap<K, V> extends ConcurrentMap<K, V> {
     /**
      * Gets the value with given key. If that value does not exist, calls given closure
      * to get the default value, puts it into the map and returns it. If closure is {@code null}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java
index 330196a..7876214 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeJobSibling.java
@@ -11,7 +11,6 @@ package org.apache.ignite.compute;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 
 import java.util.*;
 
@@ -19,7 +18,7 @@ import java.util.*;
  * Job sibling interface defines a job from the same split. In other words a sibling is a job returned
  * from the same {@link ComputeTask#map(List, Object)} method invocation.
  */
-public interface ComputeJobSibling extends GridMetadataAware {
+public interface ComputeJobSibling {
     /**
      * Gets ID of this grid job sibling. Note that ID stays constant
      * throughout job life time, even if a job gets failed over to another

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java
index e4ee221..4176aa1 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeLoadBalancer.java
@@ -11,7 +11,6 @@ package org.apache.ignite.compute;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
-import org.gridgain.grid.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
@@ -93,7 +92,7 @@ import java.util.*;
  * }
  * </pre>
  */
-public interface ComputeLoadBalancer extends GridMetadataAware {
+public interface ComputeLoadBalancer {
     /**
      * Gets the next balanced node according to the underlying load balancing policy.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/apache/ignite/logger/java/IgniteJavaLogger.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/logger/java/IgniteJavaLogger.java b/modules/core/src/main/java/org/apache/ignite/logger/java/IgniteJavaLogger.java
index 9e806fd..0071715 100644
--- a/modules/core/src/main/java/org/apache/ignite/logger/java/IgniteJavaLogger.java
+++ b/modules/core/src/main/java/org/apache/ignite/logger/java/IgniteJavaLogger.java
@@ -11,8 +11,6 @@ package org.apache.ignite.logger.java;
 
 import org.apache.ignite.*;
 import org.apache.ignite.logger.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -75,7 +73,7 @@ import static org.apache.ignite.IgniteSystemProperties.*;
  * logger in your task/job code. See {@link org.apache.ignite.resources.IgniteLoggerResource} annotation about logger
  * injection.
  */
-public class IgniteJavaLogger extends GridMetadataAwareAdapter implements IgniteLogger, IgniteLoggerNodeIdAware {
+public class IgniteJavaLogger implements IgniteLogger, IgniteLoggerNodeIdAware {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/GridMetadataAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/GridMetadataAware.java b/modules/core/src/main/java/org/gridgain/grid/GridMetadataAware.java
deleted file mode 100644
index 7a7c739..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/GridMetadataAware.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid;
-
-import org.jetbrains.annotations.*;
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-/**
- * Allows to attach metadata attributes to any entity that implements
- * this interface. This promotes <i>meta-programming technique</i> throughout the
- * GridGain APIs by allowing to attach and query the <b>metadata information</b> to top-level
- * entities in GridGain APIs.
- * <p>
- * Note that unlike other types of attributes the metadata is explicitly
- * local to VM. Local metadata does not have any distribution semantic and is not
- * specifically distributed in any way. Note, however, that if object that implements this
- * interface gets serialized and deserialized on the remote node the attachments may or may not
- * be carried over (depending on the implementation). All classes that come with GridGain
- * and implement this interface support proper serialization and deserialization.
- * <p>
- * For example, this may become useful for cache entries or
- * cache transactions. Cache entry attachment can be used whenever entry
- * needs to carry additional context and it is too expensive to keep
- * looking that context up from a separate map by a key. For example,
- * an expiration policy used by caches may add some expiration
- * context to cache entries to properly expire them.
- */
-public interface GridMetadataAware extends Serializable {
-    /**
-     * Copies all metadata from another instance.
-     *
-     * @param from Metadata aware instance to copy metadata from.
-     */
-    public void copyMeta(GridMetadataAware from);
-
-    /**
-     * Copies all metadata from given map.
-     *
-     * @param data Map to copy metadata from.
-     */
-    public void copyMeta(Map<String, ?> data);
-
-    /**
-     * Adds a new metadata.
-     *
-     * @param name Metadata name.
-     * @param val Metadata value.
-     * @param <V> Type of the value.
-     * @return Metadata previously associated with given name, or
-     *      {@code null} if there was none.
-     */
-    @Nullable public <V> V addMeta(String name, V val);
-
-    /**
-     * Adds given metadata value only if it was absent.
-     *
-     * @param name Metadata name.
-     * @param val Value to add if it's not attached already.
-     * @param <V> Type of the value.
-     * @return {@code null} if new value was put, or current value if put didn't happen.
-     */
-    @Nullable public <V> V putMetaIfAbsent(String name, V val);
-
-    /**
-     * Adds given metadata value only if it was absent.
-     *
-     * @param name Metadata name.
-     * @param c Factory closure to produce value to add if it's not attached already.
-     *      Not that unlike {@link #addMeta(String, Object)} method the factory closure will
-     *      not be called unless the value is required and therefore value will only be created
-     *      when it is actually needed.
-     * @param <V> Type of the value.
-     * @return {@code null} if new value was put, or current value if put didn't happen.
-     */
-    @Nullable public <V> V putMetaIfAbsent(String name, Callable<V> c);
-
-    /**
-     * Adds given metadata value only if it was absent. Unlike
-     * {@link #putMetaIfAbsent(String, Callable)}, this method always returns
-     * the latest value and never previous one. 
-     *
-     * @param name Metadata name.
-     * @param val Value to add if it's not attached already.
-     * @param <V> Type of the value.
-     * @return The value of the metadata after execution of this method.
-     */
-    public <V> V addMetaIfAbsent(String name, V val);
-
-    /**
-     * Adds given metadata value only if it was absent.
-     *
-     * @param name Metadata name.
-     * @param c Factory closure to produce value to add if it's not attached already.
-     *      Not that unlike {@link #addMeta(String, Object)} method the factory closure will
-     *      not be called unless the value is required and therefore value will only be created
-     *      when it is actually needed. If {@code null} and metadata value is missing - {@code null}
-     *      will be returned from this method.
-     * @param <V> Type of the value.
-     * @return The value of the metadata after execution of this method.
-     */
-    @Nullable public <V> V addMetaIfAbsent(String name, @Nullable Callable<V> c);
-
-    /**
-     * Gets metadata by name.
-     *
-     * @param name Metadata name.
-     * @param <V> Type of the value.
-     * @return Metadata value or {@code null}.
-     */
-    public <V> V meta(String name);
-
-    /**
-     * Removes metadata by name.
-     *
-     * @param name Name of the metadata to remove.
-     * @param <V> Type of the value.
-     * @return Value of removed metadata or {@code null}.
-     */
-    public <V> V removeMeta(String name);
-
-    /**
-     * Removes metadata only if its current value is equal to {@code val} passed in.
-     *
-     * @param name Name of metadata attribute.
-     * @param val Value to compare.
-     * @param <V> Value type.
-     * @return {@code True} if value was removed, {@code false} otherwise.
-     */
-    public <V> boolean removeMeta(String name, V val);
-
-    /**
-     * Gets all metadata in this entry.
-     *
-     * @param <V> Type of the value.
-     * @return All metadata in this entry.
-     */
-    public <V> Map<String, V> allMeta();
-
-    /**
-     * Tests whether or not given metadata is set.
-     *
-     * @param name Name of the metadata to test.
-     * @return Whether or not given metadata is set.
-     */
-    public boolean hasMeta(String name);
-
-    /**
-     * Tests whether or not metadata with given name and value is set. Returns {@code true} if
-     * attachment with given name it set and its value is equals to provided value. Otherwise returns
-     * {@code false}.
-     *
-     * @param name Name of the metadata.
-     * @param val Value to compare. Cannot be {@code null}.
-     * @param <V> Type of the value.
-     * @return {@code true} if metadata with given name is set and its value is equals to provided value -
-     *      otherwise returns {@code false}.
-     */
-    public <V> boolean hasMeta(String name, V val);
-
-    /**
-     * Replaces given metadata with new {@code newVal} value only if its current value
-     * is equal to {@code curVal}. Otherwise, it is no-op.
-     *
-     * @param name Name of the metadata.
-     * @param curVal Current value to check.
-     * @param newVal New value.
-     * @return {@code true} if replacement occurred, {@code false} otherwise.
-     */
-    public <V> boolean replaceMeta(String name, V curVal, V newVal);
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
index 725f377..6966cb5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java
@@ -11,11 +11,11 @@ package org.gridgain.grid.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
 import java.util.Map.*;
+import java.util.concurrent.*;
 
 /**
  * This interface provides a rich API for working with individual cache entries. It
@@ -78,7 +78,7 @@ import java.util.Map.*;
  * @param <K> Key type.
  * @param <V> Value type.
  */
-public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware {
+public interface GridCacheEntry<K, V> extends Map.Entry<K, V> {
     /**
      * Cache projection to which this entry belongs. Note that entry and its
      * parent projections have same flags and filters.
@@ -557,4 +557,77 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware
      * @throws IgniteCheckedException If failed to evaluate entry size.
      */
     public int memorySize() throws IgniteCheckedException;
+
+    /**
+     * Removes metadata by name.
+     *
+     * @param name Name of the metadata to remove.
+     * @param <V> Type of the value.
+     * @return Value of removed metadata or {@code null}.
+     */
+    public <V> V removeMeta(String name);
+
+    /**
+     * Removes metadata only if its current value is equal to {@code val} passed in.
+     *
+     * @param name Name of metadata attribute.
+     * @param val Value to compare.
+     * @param <V> Value type.
+     * @return {@code True} if value was removed, {@code false} otherwise.
+     */
+    public <V> boolean removeMeta(String name, V val);
+
+    /**
+     * Gets metadata by name.
+     *
+     * @param name Metadata name.
+     * @param <V> Type of the value.
+     * @return Metadata value or {@code null}.
+     */
+    public <V> V meta(String name);
+
+    /**
+     * Adds given metadata value only if it was absent.
+     *
+     * @param name Metadata name.
+     * @param c Factory closure to produce value to add if it's not attached already.
+     *      Not that unlike {@link #addMeta(String, Object)} method the factory closure will
+     *      not be called unless the value is required and therefore value will only be created
+     *      when it is actually needed.
+     * @param <V> Type of the value.
+     * @return {@code null} if new value was put, or current value if put didn't happen.
+     */
+    @Nullable public <V> V putMetaIfAbsent(String name, Callable<V> c);
+
+    /**
+     * Adds given metadata value only if it was absent.
+     *
+     * @param name Metadata name.
+     * @param val Value to add if it's not attached already.
+     * @param <V> Type of the value.
+     * @return {@code null} if new value was put, or current value if put didn't happen.
+     */
+    @Nullable public <V> V putMetaIfAbsent(String name, V val);
+
+    /**
+     * Adds a new metadata.
+     *
+     * @param name Metadata name.
+     * @param val Metadata value.
+     * @param <V> Type of the value.
+     * @return Metadata previously associated with given name, or
+     *      {@code null} if there was none.
+     */
+    @Nullable public <V> V addMeta(String name, V val);
+
+    /**
+     * Replaces given metadata with new {@code newVal} value only if its current value
+     * is equal to {@code curVal}. Otherwise, it is no-op.
+     *
+     * @param name Name of the metadata.
+     * @param curVal Current value to check.
+     * @param newVal New value.
+     * @return {@code true} if replacement occurred, {@code false} otherwise.
+     */
+    public <V> boolean replaceMeta(String name, V curVal, V newVal);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
index 6e8c5bd..dde0ea2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java
@@ -11,7 +11,7 @@ package org.gridgain.grid.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
+import org.jetbrains.annotations.*;
 
 import java.util.*;
 
@@ -105,7 +105,7 @@ import java.util.*;
  * }
  * </pre>
  */
-public interface GridCacheTx extends GridMetadataAware, AutoCloseable {
+public interface GridCacheTx extends AutoCloseable {
     /**
      * Gets unique identifier for this transaction.
      *
@@ -240,4 +240,33 @@ public interface GridCacheTx extends GridMetadataAware, AutoCloseable {
      * @throws IgniteCheckedException If rollback failed.
      */
     public void rollback() throws IgniteCheckedException;
+
+    /**
+     * Removes metadata by name.
+     *
+     * @param name Name of the metadata to remove.
+     * @param <V> Type of the value.
+     * @return Value of removed metadata or {@code null}.
+     */
+    @Nullable public <V> V removeMeta(String name);
+
+    /**
+     * Gets metadata by name.
+     *
+     * @param name Metadata name.
+     * @param <V> Type of the value.
+     * @return Metadata value or {@code null}.
+     */
+    @Nullable public <V> V meta(String name);
+
+    /**
+     * Adds a new metadata.
+     *
+     * @param name Metadata name.
+     * @param val Metadata value.
+     * @param <V> Type of the value.
+     * @return Metadata previously associated with given name, or
+     *      {@code null} if there was none.
+     */
+    @Nullable public <V> V addMeta(String name, V val);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/cache/store/GridCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/store/GridCacheStore.java b/modules/core/src/main/java/org/gridgain/grid/cache/store/GridCacheStore.java
index 4bf2fc0..974c9a9 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/store/GridCacheStore.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/store/GridCacheStore.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.cache.store;
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.portables.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.store.jdbc.*;
 import org.jetbrains.annotations.*;
@@ -43,8 +42,8 @@ import java.util.Date;
  * </ul>
  * <p>
  * All transactional operations of this API are provided with ongoing {@link GridCacheTx},
- * if any. As transaction is {@link GridMetadataAware}, you can attach any metadata to
- * it, e.g. to recognize if several operations belong to the same transaction or not.
+ * if any. You can attach any metadata to it, e.g. to recognize if several operations belong
+ * to the same transaction or not.
  * Here is an example of how attach a JDBC connection as transaction metadata:
  * <pre name="code" class="java">
  * Connection conn = tx.meta("some.name");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterNodeLocalMapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterNodeLocalMapImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterNodeLocalMapImpl.java
index da31c46..54cb206 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterNodeLocalMapImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterNodeLocalMapImpl.java
@@ -10,15 +10,12 @@
 package org.gridgain.grid.kernal;
 
 import org.apache.ignite.cluster.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.lang.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
-import java.util.*;
 import java.util.concurrent.*;
 
 /**
@@ -33,9 +30,6 @@ public class ClusterNodeLocalMapImpl<K, V> extends ConcurrentHashMap8<K, V> impl
     private static final ThreadLocal<String> stash = new ThreadLocal<>();
 
     /** */
-    private GridMetadataAwareAdapter impl = new GridMetadataAwareAdapter();
-
-    /** */
     private GridKernalContext ctx;
 
     /**
@@ -66,80 +60,6 @@ public class ClusterNodeLocalMapImpl<K, V> extends ConcurrentHashMap8<K, V> impl
     }
 
     /** {@inheritDoc} */
-    @Override public <V> V addMeta(String name, V val) {
-        return impl.addMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> V putMetaIfAbsent(String name, V val) {
-        return impl.putMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> V putMetaIfAbsent(String name, Callable<V> c) {
-        return impl.putMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> V addMetaIfAbsent(String name, V val) {
-        return impl.addMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> V addMetaIfAbsent(String name, Callable<V> c) {
-        return impl.addMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable
-    @Override public <V> V meta(String name) {
-        return (V)impl.meta(name);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable
-    @Override public <V> V removeMeta(String name) {
-        return (V)impl.removeMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> boolean removeMeta(String name, V val) {
-        return impl.removeMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> Map<String, V> allMeta() {
-        return impl.allMeta();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        return impl.hasMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> boolean hasMeta(String name, V val) {
-        return impl.hasMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> boolean replaceMeta(String name, V curVal, V newVal) {
-        return impl.replaceMeta(name, curVal, newVal);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        impl.copyMeta(from);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        impl.copyMeta(data);
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         U.writeString(out, ctx.gridName());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java
index 7db3f51..9ab9c36 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobContextImpl.java
@@ -12,14 +12,12 @@ package org.gridgain.grid.kernal;
 import org.apache.ignite.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
 import org.gridgain.grid.kernal.processors.job.*;
 import org.gridgain.grid.kernal.processors.timeout.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.tostring.*;
 import org.jetbrains.annotations.*;
 
@@ -31,7 +29,7 @@ import java.util.concurrent.atomic.*;
 /**
  * Remote job context implementation.
  */
-public class GridJobContextImpl extends GridMetadataAwareAdapter implements ComputeJobContext, Externalizable {
+public class GridJobContextImpl implements ComputeJobContext, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java
index c8efde8..19fec20 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
 import java.io.*;
@@ -25,7 +24,7 @@ import static org.gridgain.grid.kernal.managers.communication.GridIoPolicy.*;
 /**
  * This class provides implementation for job sibling.
  */
-public class GridJobSiblingImpl extends GridMetadataAwareAdapter implements ComputeJobSibling, Externalizable {
+public class GridJobSiblingImpl implements ComputeJobSibling, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContext.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContext.java
index 7b161a4..85aa3c0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContext.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContext.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.plugin.*;
 import org.apache.ignite.product.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.managers.security.*;
 import org.gridgain.grid.kernal.managers.checkpoint.*;
 import org.gridgain.grid.kernal.managers.collision.*;
@@ -63,7 +62,7 @@ import java.util.concurrent.*;
  *
  */
 @GridToStringExclude
-public interface GridKernalContext extends GridMetadataAware, Iterable<GridComponent> {
+public interface GridKernalContext extends Iterable<GridComponent> {
     /**
      * Gets list of all grid components in the order they were added.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java
index b6f4ac8..1ac9f25 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernalContextImpl.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.plugin.*;
 import org.apache.ignite.product.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.managers.checkpoint.*;
 import org.gridgain.grid.kernal.managers.collision.*;
 import org.gridgain.grid.kernal.managers.communication.*;
@@ -57,7 +56,6 @@ import org.gridgain.grid.kernal.processors.streamer.*;
 import org.gridgain.grid.kernal.processors.task.*;
 import org.gridgain.grid.kernal.processors.timeout.*;
 import org.gridgain.grid.util.direct.*;
-import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.tostring.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -75,7 +73,7 @@ import static org.gridgain.grid.kernal.GridKernalState.*;
  * Implementation of kernal context.
  */
 @GridToStringExclude
-public class GridKernalContextImpl extends GridMetadataAwareAdapter implements GridKernalContext, Externalizable {
+public class GridKernalContextImpl implements GridKernalContext, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java
index 065488b..f9e8189 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java
@@ -12,10 +12,8 @@ package org.gridgain.grid.kernal;
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.lifecycle.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.tostring.*;
 import org.jetbrains.annotations.*;
 
@@ -27,8 +25,7 @@ import static org.apache.ignite.IgniteSystemProperties.*;
 /**
  *
  */
-public class GridLoggerProxy extends GridMetadataAwareAdapter implements IgniteLogger, LifecycleAware,
-    Externalizable {
+public class GridLoggerProxy implements IgniteLogger, LifecycleAware, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java b/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
index 8be6cc1..1122121 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/executor/GridExecutorService.java
@@ -12,10 +12,8 @@ package org.gridgain.grid.kernal.executor;
 import org.apache.ignite.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.util.future.*;
-import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
@@ -64,7 +62,7 @@ import java.util.concurrent.*;
  * }
  * </pre>
  */
-public class GridExecutorService extends GridMetadataAwareAdapter implements ExecutorService, Externalizable {
+public class GridExecutorService implements ExecutorService, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/managers/loadbalancer/GridLoadBalancerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/loadbalancer/GridLoadBalancerAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/loadbalancer/GridLoadBalancerAdapter.java
index 0b3b254..75d9331 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/loadbalancer/GridLoadBalancerAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/loadbalancer/GridLoadBalancerAdapter.java
@@ -10,15 +10,13 @@
 package org.gridgain.grid.kernal.managers.loadbalancer;
 
 import org.apache.ignite.compute.*;
-import org.gridgain.grid.util.lang.*;
 
 import java.io.*;
 
 /**
  * This adapter allows for graceful exception when load balancer gets marshalled.
  */
-public abstract class GridLoadBalancerAdapter extends GridMetadataAwareAdapter implements ComputeLoadBalancer,
-    Externalizable {
+public abstract class GridLoadBalancerAdapter implements ComputeLoadBalancer, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
index bf40a85..66eb0ac 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
@@ -52,8 +52,6 @@ import static org.gridgain.grid.cache.GridCacheFlag.*;
 import static org.gridgain.grid.cache.GridCachePeekMode.*;
 import static org.gridgain.grid.cache.GridCacheTxConcurrency.*;
 import static org.gridgain.grid.cache.GridCacheTxIsolation.*;
-import static org.gridgain.grid.cache.GridCacheTxState.*;
-import static org.apache.ignite.events.IgniteEventType.*;
 import static org.gridgain.grid.kernal.GridClosureCallMode.*;
 import static org.gridgain.grid.kernal.processors.dr.GridDrType.*;
 import static org.gridgain.grid.kernal.processors.task.GridTaskThreadContextKey.*;
@@ -62,7 +60,7 @@ import static org.gridgain.grid.kernal.processors.task.GridTaskThreadContextKey.
  * Adapter for different cache implementations.
  */
 @SuppressWarnings("unchecked")
-public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter implements GridCache<K, V>,
+public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     GridCacheProjectionEx<K, V>, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryEx.java
index e94016f..f6eb3c2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryEx.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
 import org.gridgain.grid.kernal.processors.dr.*;
@@ -19,11 +18,12 @@ import org.gridgain.grid.util.lang.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
+import java.util.concurrent.*;
 
 /**
  * Internal API for cache entry ({@code 'Ex'} stands for extended).
  */
-public interface GridCacheEntryEx<K, V> extends GridMetadataAware {
+public interface GridCacheEntryEx<K, V> {
     /**
      * @return Memory size.
      * @throws IgniteCheckedException If failed.
@@ -884,4 +884,85 @@ public interface GridCacheEntryEx<K, V> extends GridMetadataAware {
      * @throws IgniteCheckedException If failed.
      */
     @Nullable public V unswap(boolean ignoreFlags, boolean needVal) throws IgniteCheckedException;
+
+    /**
+     * Tests whether or not given metadata is set.
+     *
+     * @param name Name of the metadata to test.
+     * @return Whether or not given metadata is set.
+     */
+    public boolean hasMeta(String name);
+
+    /**
+     * Gets metadata by name.
+     *
+     * @param name Metadata name.
+     * @param <V> Type of the value.
+     * @return Metadata value or {@code null}.
+     */
+    @Nullable public <V> V meta(String name);
+
+    /**
+     * Adds a new metadata.
+     *
+     * @param name Metadata name.
+     * @param val Metadata value.
+     * @param <V> Type of the value.
+     * @return Metadata previously associated with given name, or
+     *      {@code null} if there was none.
+     */
+    @Nullable public <V> V addMeta(String name, V val);
+
+    /**
+     * Adds given metadata value only if it was absent.
+     *
+     * @param name Metadata name.
+     * @param val Value to add if it's not attached already.
+     * @param <V> Type of the value.
+     * @return {@code null} if new value was put, or current value if put didn't happen.
+     */
+    @Nullable public <V> V putMetaIfAbsent(String name, V val);
+
+    /**
+     * Adds given metadata value only if it was absent.
+     *
+     * @param name Metadata name.
+     * @param c Factory closure to produce value to add if it's not attached already.
+     *      Not that unlike {@link #addMeta(String, Object)} method the factory closure will
+     *      not be called unless the value is required and therefore value will only be created
+     *      when it is actually needed.
+     * @param <V> Type of the value.
+     * @return {@code null} if new value was put, or current value if put didn't happen.
+     */
+    @Nullable public <V> V putMetaIfAbsent(String name, Callable<V> c);
+
+    /**
+     * Replaces given metadata with new {@code newVal} value only if its current value
+     * is equal to {@code curVal}. Otherwise, it is no-op.
+     *
+     * @param name Name of the metadata.
+     * @param curVal Current value to check.
+     * @param newVal New value.
+     * @return {@code true} if replacement occurred, {@code false} otherwise.
+     */
+    public <V> boolean replaceMeta(String name, V curVal, V newVal);
+
+    /**
+     * Removes metadata by name.
+     *
+     * @param name Name of the metadata to remove.
+     * @param <V> Type of the value.
+     * @return Value of removed metadata or {@code null}.
+     */
+    @Nullable public <V> V removeMeta(String name);
+
+    /**
+     * Removes metadata only if its current value is equal to {@code val} passed in.
+     *
+     * @param name Name of metadata attribute.
+     * @param val Value to compare.
+     * @param <V> Value type.
+     * @return {@code True} if value was removed, {@code false} otherwise.
+     */
+    public <V> boolean removeMeta(String name, V val);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
index 452e074..4184415 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryImpl.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
 import org.gridgain.grid.util.lang.*;
@@ -565,7 +564,7 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
     /** {@inheritDoc} */
     @SuppressWarnings({"unchecked"})
     @Override public <V1> V1 meta(String name) {
-        GridCacheEntryEx e = unwrapForMeta();
+        GridCacheEntryEx<K, V> e = unwrapForMeta();
 
         return e.meta(name);
     }
@@ -573,30 +572,9 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
     /** {@inheritDoc} */
     @SuppressWarnings({"unchecked"})
     @Override public <V1> V1 removeMeta(String name) {
-        GridCacheEntryEx e = unwrapForMeta();
-
-        return e.removeMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> Map<String, V1> allMeta() {
-        GridCacheEntryEx e = unwrapForMeta();
-
-        return e.allMeta();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        GridCacheEntryEx<K, V> e = unwrapForMeta();
-
-        return e.hasMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name, Object val) {
         GridCacheEntryEx<K, V> e = unwrapForMeta();
 
-        return e.hasMeta(name, val);
+        return e.removeMeta(name);
     }
 
     /** {@inheritDoc} */
@@ -614,20 +592,6 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public <V1> V1 addMetaIfAbsent(String name, V1 val) {
-        GridCacheEntryEx<K, V> cached = unwrapForMeta();
-
-        return cached.addMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 addMetaIfAbsent(String name, Callable<V1> c) {
-        GridCacheEntryEx<K, V> cached = unwrapForMeta();
-
-        return cached.addMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V1> boolean replaceMeta(String name, V1 curVal, V1 newVal) {
         GridCacheEntryEx<K, V> cached = unwrapForMeta();
 
@@ -635,20 +599,6 @@ public class GridCacheEntryImpl<K, V> implements GridCacheEntry<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        GridCacheEntryEx<K, V> cached = unwrapForMeta();
-
-        cached.copyMeta(from);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        GridCacheEntryEx<K, V> cached = unwrapForMeta();
-
-        cached.copyMeta(data);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V1> boolean removeMeta(String name, V1 val) {
         GridCacheEntryEx e = unwrapForMeta();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
index b15b958..df673bd 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheEvictionEntry.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -383,21 +382,6 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
     }
 
     /** {@inheritDoc} */
-    @Override public <V> Map<String, V> allMeta() {
-        return cached.allMeta();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        return cached.hasMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name, Object val) {
-        return cached.hasMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V> V putMetaIfAbsent(String name, V val) {
         return cached.putMetaIfAbsent(name, val);
     }
@@ -408,31 +392,11 @@ public class GridCacheEvictionEntry<K, V> implements GridCacheEntry<K, V>, Exter
     }
 
     /** {@inheritDoc} */
-    @Override public <V> V addMetaIfAbsent(String name, V val) {
-        return cached.addMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> V addMetaIfAbsent(String name, Callable<V> c) {
-        return cached.addMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V> boolean replaceMeta(String name, V curVal, V newVal) {
         return cached.replaceMeta(name, curVal, newVal);
     }
 
     /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        cached.copyMeta(from);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        cached.copyMeta(data);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V> boolean removeMeta(String name, V val) {
         return cached.removeMeta(name, val);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
index 6862a5e..52cf8f8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheFilterEvaluationEntry.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -353,16 +352,6 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        impl.copyMeta(from);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        impl.copyMeta(data);
-    }
-
-    /** {@inheritDoc} */
     @Nullable @Override public <V> V addMeta(String name, V val) {
         return impl.addMeta(name, val);
     }
@@ -378,16 +367,6 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public <V> V addMetaIfAbsent(String name, V val) {
-        return impl.addMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public <V> V addMetaIfAbsent(String name, @Nullable Callable<V> c) {
-        return impl.addMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V> V meta(String name) {
         return impl.meta(name);
     }
@@ -403,21 +382,6 @@ public class GridCacheFilterEvaluationEntry<K, V> implements GridCacheEntry<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public <V> Map<String, V> allMeta() {
-        return impl.allMeta();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        return impl.hasMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> boolean hasMeta(String name, V val) {
-        return impl.hasMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V> boolean replaceMeta(String name, V curVal, V newVal) {
         return impl.replaceMeta(name, curVal, newVal);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheLogger.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheLogger.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheLogger.java
index 7cc4593..a33e7dd 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheLogger.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheLogger.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.tostring.*;
 import org.jetbrains.annotations.*;
 
@@ -23,7 +22,7 @@ import java.io.*;
  * Logger which automatically attaches {@code [cacheName]} to every log statement.
  */
 @GridToStringExclude
-class GridCacheLogger extends GridMetadataAwareAdapter implements IgniteLogger, Externalizable {
+class GridCacheLogger implements IgniteLogger, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
index 32c1485..064ee86 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.managers.deployment.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -3662,30 +3661,6 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K, V>
     }
 
     /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        A.notNull(from, "from");
-
-        synchronized (this) {
-            Map m = from.allMeta();
-
-            ensureData(m.size());
-
-            attributeDataExtras().putAll(from.allMeta());
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> attrData) {
-        A.notNull(attrData, "data");
-
-        synchronized (this) {
-            ensureData(attrData.size());
-
-            attributeDataExtras().putAll(attrData);
-        }
-    }
-
-    /** {@inheritDoc} */
     @SuppressWarnings({"unchecked"})
     @Nullable @Override public <V1> V1 addMeta(String name, V1 val) {
         A.notNull(name, "name", val, "val");
@@ -3711,8 +3686,7 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K, V>
 
     /** {@inheritDoc} */
     @SuppressWarnings({"unchecked"})
-    @Nullable
-    @Override public <V1> V1 removeMeta(String name) {
+    @Nullable @Override public <V1> V1 removeMeta(String name) {
         A.notNull(name, "name");
 
         synchronized (this) {
@@ -3757,36 +3731,11 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K, V>
     }
 
     /** {@inheritDoc} */
-    @SuppressWarnings( {"unchecked", "RedundantCast"})
-    @Override public synchronized  <V1> Map<String, V1> allMeta() {
-        GridLeanMap<String, Object> attrData = attributeDataExtras();
-
-        if (attrData == null)
-            return Collections.emptyMap();
-
-        if (attrData.size() <= 5)
-            // This is a singleton unmodifiable map.
-            return (Map<String, V1>)attrData;
-
-        // Return a copy.
-        return new HashMap<>((Map<String, V1>)attrData);
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean hasMeta(String name) {
         return meta(name) != null;
     }
 
     /** {@inheritDoc} */
-    @Override public <V1> boolean hasMeta(String name, V1 val) {
-        A.notNull(name, "name");
-
-        Object v = meta(name);
-
-        return v != null && v.equals(val);
-    }
-
-    /** {@inheritDoc} */
     @SuppressWarnings({"unchecked"})
     @Nullable @Override public <V1> V1 putMetaIfAbsent(String name, V1 val) {
         A.notNull(name, "name", val, "val");
@@ -3822,41 +3771,6 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K, V>
     }
 
     /** {@inheritDoc} */
-    @SuppressWarnings({"unchecked"})
-    @Override public <V1> V1 addMetaIfAbsent(String name, V1 val) {
-        A.notNull(name, "name", val, "val");
-
-        synchronized (this) {
-            V1 v = meta(name);
-
-            if (v == null)
-                addMeta(name, v = val);
-
-            return v;
-        }
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings({"unchecked"})
-    @Nullable @Override public <V1> V1 addMetaIfAbsent(String name, @Nullable Callable<V1> c) {
-        A.notNull(name, "name", c, "c");
-
-        synchronized (this) {
-            V1 v = meta(name);
-
-            if (v == null && c != null)
-                try {
-                    addMeta(name, v = c.call());
-                }
-                catch (Exception e) {
-                    throw F.wrap(e);
-                }
-
-            return v;
-        }
-    }
-
-    /** {@inheritDoc} */
     @SuppressWarnings({"RedundantTypeArguments"})
     @Override public <V1> boolean replaceMeta(String name, V1 curVal, V1 newVal) {
         A.notNull(name, "name", newVal, "newVal", curVal, "curVal");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
index 4e61db6..0c2ec00 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxProxyImpl.java
@@ -11,15 +11,12 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.util.tostring.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.jetbrains.annotations.*;
 
 import java.io.*;
 import java.util.*;
-import java.util.concurrent.*;
 
 /**
  * Cache transaction proxy.
@@ -213,43 +210,12 @@ public class GridCacheTxProxyImpl<K, V> implements GridCacheTxProxy, Externaliza
             leave();
         }
     }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        tx.copyMeta(from);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        tx.copyMeta(data);
-    }
-
     /** {@inheritDoc} */
     @Override public <V1> V1 addMeta(String name, V1 val) {
         return tx.addMeta(name, val);
     }
 
     /** {@inheritDoc} */
-    @Override public <V1> V1 putMetaIfAbsent(String name, V1 val) {
-        return tx.putMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 putMetaIfAbsent(String name, Callable<V1> c) {
-        return tx.putMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public <V1> V1 addMetaIfAbsent(String name, V1 val) {
-        return tx.addMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 addMetaIfAbsent(String name, @Nullable Callable<V1> c) {
-        return tx.addMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
     @SuppressWarnings({"RedundantTypeArguments"})
     @Override public <V1> V1 meta(String name) {
         return tx.<V1>meta(name);
@@ -262,31 +228,6 @@ public class GridCacheTxProxyImpl<K, V> implements GridCacheTxProxy, Externaliza
     }
 
     /** {@inheritDoc} */
-    @Override public <V1> boolean removeMeta(String name, V1 val) {
-        return tx.removeMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> Map<String, V1> allMeta() {
-        return tx.allMeta();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        return tx.hasMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> boolean hasMeta(String name, V1 val) {
-        return tx.hasMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> boolean replaceMeta(String name, V1 curVal, V1 newVal) {
-        return tx.replaceMeta(name, curVal, newVal);
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         out.writeObject(tx);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridPartitionedCacheEntryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridPartitionedCacheEntryImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridPartitionedCacheEntryImpl.java
index 7810847..2b138cb 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridPartitionedCacheEntryImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridPartitionedCacheEntryImpl.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -276,120 +275,6 @@ public class GridPartitionedCacheEntryImpl<K, V> extends GridCacheEntryImpl<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public <V1> V1 addMetaIfAbsent(String name, Callable<V1> c) {
-        V1 v = null;
-
-        GridDhtCacheEntry<K, V> de = dht().peekExx(key);
-
-        if (de != null)
-            v = de.addMetaIfAbsent(name, c);
-
-        if (ctx.isNear()) {
-            GridNearCacheEntry<K, V> ne = de != null ? near().peekExx(key) :
-                near().entryExx(key, ctx.affinity().affinityTopologyVersion());
-
-            if (ne != null) {
-                V1 v1 = ne.addMetaIfAbsent(name, c);
-
-                if (v == null)
-                    v = v1;
-            }
-        }
-
-        return v;
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 addMetaIfAbsent(String name, V1 val) {
-        V1 v = null;
-
-        GridDhtCacheEntry<K, V> de = dht().peekExx(key);
-
-        if (de != null)
-            v = de.addMetaIfAbsent(name, val);
-
-        if (ctx.isNear()) {
-            GridNearCacheEntry<K, V> ne = de != null ? near().peekExx(key) :
-                near().entryExx(key, ctx.affinity().affinityTopologyVersion());
-
-            if (ne != null) {
-                V1 v1 = ne.addMetaIfAbsent(name, val);
-
-                if (v == null)
-                    v = v1;
-            }
-        }
-
-        return v;
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> Map<String, V1> allMeta() {
-        Map<String, V1> m = null;
-
-        GridDhtCacheEntry<K, V> de = dht().peekExx(key);
-
-        if (de != null)
-            m = de.allMeta();
-
-        if (ctx.isNear()) {
-            GridNearCacheEntry<K, V> ne = near().peekExx(key);
-
-            if (ne != null) {
-                Map<String, V1> m1 = ne.allMeta();
-
-                if (m == null)
-                    m = m1;
-                else if (!m1.isEmpty()) {
-                    for (Map.Entry<String, V1> e1 : m1.entrySet())
-                        if (!m.containsKey(e1.getKey())) // Give preference to DHT.
-                            m.put(e1.getKey(), e1.getValue());
-                }
-            }
-        }
-
-        return m;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        boolean b = false;
-
-        GridDhtCacheEntry<K, V> de = dht().peekExx(key);
-
-        if (de != null)
-            b = de.hasMeta(name);
-
-        if (ctx.isNear()) {
-            GridNearCacheEntry<K, V> ne = near().peekExx(key);
-
-            if (ne != null)
-                b |= ne.hasMeta(name);
-        }
-
-        return b;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name, Object val) {
-        boolean b = false;
-
-        GridDhtCacheEntry<K, V> de = dht().peekExx(key);
-
-        if (de != null)
-            b = de.hasMeta(name, val);
-
-        if (ctx.isNear()) {
-            GridNearCacheEntry<K, V> ne = near().peekExx(key);
-
-            if (ne != null)
-                b |= ne.hasMeta(name, val);
-        }
-
-        return b;
-    }
-
-    /** {@inheritDoc} */
     @SuppressWarnings( {"RedundantCast"})
     @Override public <V1> V1 meta(String name) {
         V1 v = null;
@@ -524,38 +409,6 @@ public class GridPartitionedCacheEntryImpl<K, V> extends GridCacheEntryImpl<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        GridDhtCacheEntry<K, V> de = dht().peekExx(key);
-
-        if (de != null)
-            de.copyMeta(data);
-
-        if (ctx.isNear()) {
-            GridNearCacheEntry<K, V> ne = de != null ? near().peekExx(key) :
-                near().entryExx(key, ctx.affinity().affinityTopologyVersion());
-
-            if (ne != null)
-                ne.copyMeta(data);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        GridDhtCacheEntry<K, V> de = dht().peekExx(key);
-
-        if (de != null)
-            de.copyMeta(from);
-
-        if (ctx.isNear()) {
-            GridNearCacheEntry<K, V> ne = de != null ? near().peekExx(key) :
-                near().entryExx(key, ctx.affinity().affinityTopologyVersion());
-
-            if (ne != null)
-                ne.copyMeta(from);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridPartitionedCacheEntryImpl.class, this, super.toString());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
index 25c0668..854a65f 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
@@ -16,7 +16,6 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.indexing.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.*;
@@ -2804,17 +2803,6 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
         }
 
         /** {@inheritDoc} */
-        @Override public void copyMeta(GridMetadataAware from) {
-            throw new UnsupportedOperationException();
-        }
-
-        /** {@inheritDoc} */
-        @Override public void copyMeta(Map<String, ?> data) {
-            throw new UnsupportedOperationException();
-
-        }
-
-        /** {@inheritDoc} */
         @Nullable @Override public <V> V addMeta(String name, V val) {
             throw new UnsupportedOperationException();
         }
@@ -2830,16 +2818,6 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
         }
 
         /** {@inheritDoc} */
-        @Override public <V> V addMetaIfAbsent(String name, V val) {
-            throw new UnsupportedOperationException();
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public <V> V addMetaIfAbsent(String name, @Nullable Callable<V> c) {
-            throw new UnsupportedOperationException();
-        }
-
-        /** {@inheritDoc} */
         @Override public <V> V meta(String name) {
             return null;
         }
@@ -2855,21 +2833,6 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
         }
 
         /** {@inheritDoc} */
-        @Override public <V> Map<String, V> allMeta() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean hasMeta(String name) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public <V> boolean hasMeta(String name, V val) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
         @Override public <V> boolean replaceMeta(String name, V curVal, V newVal) {
             throw new UnsupportedOperationException();
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
index 75453ee..a0ae428 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryEntry.java
@@ -12,7 +12,6 @@ package org.gridgain.grid.kernal.processors.cache.query.continuous;
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.managers.deployment.*;
 import org.gridgain.grid.kernal.processors.cache.*;
@@ -582,20 +581,6 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
     }
 
     /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        assert impl != null;
-
-        impl.copyMeta(from);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        assert impl != null;
-
-        impl.copyMeta(data);
-    }
-
-    /** {@inheritDoc} */
     @Nullable @Override public <V> V addMeta(String name, V val) {
         assert impl != null;
 
@@ -617,20 +602,6 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
     }
 
     /** {@inheritDoc} */
-    @Override public <V> V addMetaIfAbsent(String name, V val) {
-        assert impl != null;
-
-        return impl.addMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public <V> V addMetaIfAbsent(String name, @Nullable Callable<V> c) {
-        assert impl != null;
-
-        return impl.addMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V> V meta(String name) {
         assert impl != null;
 
@@ -652,27 +623,6 @@ public class GridCacheContinuousQueryEntry<K, V> implements GridCacheEntry<K, V>
     }
 
     /** {@inheritDoc} */
-    @Override public <V> Map<String, V> allMeta() {
-        assert impl != null;
-
-        return impl.allMeta();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        assert impl != null;
-
-        return impl.hasMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V> boolean hasMeta(String name, V val) {
-        assert impl != null;
-
-        return impl.hasMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
     @Override public <V> boolean replaceMeta(String name, V curVal, V newVal) {
         assert impl != null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
index 803badd..72910a4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
@@ -1757,25 +1757,6 @@ public abstract class GridUtils {
     }
 
     /**
-     * Copies metadata from given object into the passed in metadata aware
-     * instance - if object is not {@code null} and implements {@link GridMetadataAware}.
-     * Otherwise - returns passed metadata aware instance unchanged.
-     *
-     * @param t Passed in metadata aware instance.
-     * @param obj Object to copy metadata from.
-     * @param <T> Type of the metadata aware instance.
-     * @return Metadata aware instance with metadata potentially copied.
-     */
-    public static <T extends GridMetadataAware> T withMeta(T t, @Nullable Object obj) {
-        assert t != null;
-
-        if (obj instanceof GridMetadataAware)
-            t.copyMeta((GridMetadataAware)obj);
-
-        return t;
-    }
-
-    /**
      * Replace password in URI string with a single '*' character.
      * <p>
      * Parses given URI by applying &quot;.*://(.*:.*)@.*&quot;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
index 3fe0590..7cf70bb 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridComputeJobWrapper.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.util.lang;
 
 import org.apache.ignite.*;
 import org.apache.ignite.compute.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
@@ -21,7 +20,7 @@ import java.util.concurrent.*;
  * Convenient wrapper for grid job. It allows to create a job clone in cases when the same
  * job needs to be cloned to multiple grid nodes during mapping phase of task execution.
  */
-public class GridComputeJobWrapper extends GridMetadataAwareAdapter implements ComputeJob, Callable<Object>,
+public class GridComputeJobWrapper implements ComputeJob, Callable<Object>,
     GridPeerDeployAware {
     /** */
     private static final long serialVersionUID = 0L;
@@ -33,21 +32,14 @@ public class GridComputeJobWrapper extends GridMetadataAwareAdapter implements C
     private transient volatile GridPeerDeployAware p;
 
     /**
-     * Creates a wrapper with given grid {@code job}. If {@code job} implements {@link GridMetadataAware}
-     * interface and {@code copyMeta} is {@code true} - the metadata information will be
-     * copied from given {@code job} to this wrapper.
+     * Creates a wrapper with given grid {@code job}.
      *
      * @param job Job to wrap.
-     * @param cpMeta Whether or not to copy metadata in case when {@code job}
-     *      implements {@link GridMetadataAware} interface.
      */
-    public GridComputeJobWrapper(ComputeJob job, boolean cpMeta) {
+    public GridComputeJobWrapper(ComputeJob job) {
         A.notNull(job, "job");
 
         this.job = job;
-
-        if (cpMeta && job instanceof GridMetadataAware)
-            copyMeta((GridMetadataAware)job);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1bbd19c9/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
index 3b31ecf..fe80998 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/lang/GridFunc.java
@@ -1616,29 +1616,6 @@ public class GridFunc {
     }
 
     /**
-     * Convenient utility method that returns collections of metadata values for a given
-     * collection of metadata aware objects.
-     * <p>
-     * Note that this method doesn't create a new collection but simply iterates over the input one.
-     *
-     * @param objs Collection of metadata aware object.
-     * @param name Name of the metadata.
-     * @param <T> Type of the metadata.
-     * @return Collections of metadata value for a given collection of metadata aware objects.
-     */
-    public static <T> Collection<T> meta(Collection<? extends GridMetadataAware> objs, String name) {
-        A.notNull(objs, "objs", name, "attach");
-
-        Collection<T> c = new ArrayList<>(objs.size());
-
-        for (GridMetadataAware n : objs) {
-            c.add(n.<T>meta(name));
-        }
-
-        return c;
-    }
-
-    /**
      * Gets closure that calls {@code System.out.println()} on its bound variable.
      *
      * @param <T> Type of the bound variable.
@@ -5672,129 +5649,6 @@ public class GridFunc {
     }
 
     /**
-     * Creates predicate that accepts subclass of {@link GridMetadataAware}
-     * interface and evaluates to {@code true} if it contains all provided metadata.
-     *
-     * @param meta Collection of metadata.
-     * @param <T> Type of returned predicate.
-     * @return Predicate that accepts subclass of {@link GridMetadataAware} interface and
-     *      evaluates to {@code true} if it contains all provided metadata.
-     * @see #meta(String...)
-     * @see #meta(Iterable)
-     * @see #meta(String, Object)
-     */
-    public static <T extends GridMetadataAware> IgnitePredicate<T> metaEntry(@Nullable Map.Entry<String, ?>... meta) {
-        return metaEntry(isEmpty(meta) ? Collections.<Map.Entry<String, ?>>emptyList() : asList(meta));
-    }
-
-    /**
-     * Creates predicate that accepts subclass of {@link GridMetadataAware} interface
-     * and evaluates to {@code true} if it contains all provided metadata.
-     *
-     * @param meta Collection of metadata.
-     * @param <T> Type of returned predicate.
-     * @return Predicate that accepts subclass of {@link GridMetadataAware} interface and
-     *      evaluates to {@code true} if it contains all provided metadata.
-     * @see #meta(String...)
-     * @see #meta(Iterable)
-     * @see #meta(String, Object)
-     */
-    public static <T extends GridMetadataAware> IgnitePredicate<T> metaEntry(
-        @Nullable final Collection<? extends Map.Entry<String, ?>> meta) {
-        return isEmpty(meta) ? GridFunc.<T>alwaysFalse() : new P1<T>() {
-            @Override public boolean apply(T e) {
-                assert meta != null;
-
-                for (Map.Entry<String, ?> t : meta) {
-                    if (!F.eq(e.meta(t.getKey()), t.getValue()))
-                        return false;
-                }
-
-                return true;
-            }
-        };
-    }
-
-    /**
-     * Creates predicate that accepts subclass of {@link GridMetadataAware} interface
-     * and evaluates to {@code true} if it contains all provided metadata.
-     *
-     * @param meta Collection of metadata as a map.
-     * @param <T> Type of returned predicate.
-     * @return Predicate that accepts subclass of {@link GridMetadataAware}
-     *      interface and evaluates to {@code true} if it contains all provided metadata.
-     * @see #meta(String...)
-     * @see #meta(Iterable)
-     * @see #meta(String, Object)
-     * @see #metaEntry(Entry[])
-     * @see #metaEntry(Collection)
-     */
-    public static <T extends GridMetadataAware> IgnitePredicate<T> meta(@Nullable Map<String, ?> meta) {
-        if (isEmpty(meta))
-            return metaEntry(Collections.<Entry<String, ?>>emptySet());
-        else {
-            assert meta != null;
-
-            return metaEntry(meta.entrySet());
-        }
-    }
-
-    /**
-     * Creates predicate that accepts subclass of {@link GridMetadataAware} interface
-     * and evaluates to {@code true} if it contains given metadata.
-     *
-     * @param name Metadata name.
-     * @param val Metadata value.
-     * @param <T> Type of returned predicate.
-     * @return Predicate that accepts subclass of {@link GridMetadataAware} interface
-     *      and evaluates to {@code true} if it contains given metadata.
-     * @see #metaEntry(Entry[])
-     * @see #meta(String...)
-     * @see #meta(Iterable)
-     */
-    public static <T extends GridMetadataAware> IgnitePredicate<T> meta(String name, Object val) {
-        A.notNull(name, "name", val, "val");
-
-        return metaEntry(F.t(name, val));
-    }
-
-    /**
-     * Creates predicate that accepts subclass of {@link GridMetadataAware} interface
-     * and evaluates to {@code true} if it contains given metadata names (values are ignored).
-     *
-     * @param names Metadata names to evaluate by.
-     * @param <T> Type of returned predicate.
-     * @return Predicate that accepts subclass of {@link GridMetadataAware} interface and
-     *      evaluates to {@code true} if it contains given metadata names (values are ignored).
-     */
-    public static <T extends GridMetadataAware> IgnitePredicate<T> meta(@Nullable String... names) {
-        return meta(isEmpty(names) ? Collections.<String>emptyList() : asList(names));
-    }
-
-    /**
-     * Creates predicate that accepts subclass of {@link GridMetadataAware} interface and
-     * evaluates to {@code true} if it contains given metadata names (values are ignored).
-     *
-     * @param names Metadata names to evaluate by.
-     * @param <T> Type of returned predicate.
-     * @return Predicate that accepts subclass of {@link GridMetadataAware} interface and
-     *      evaluates to {@code true} if it contains given metadata names (values are ignored).
-     */
-    public static <T extends GridMetadataAware> IgnitePredicate<T> meta(@Nullable final Iterable<String> names) {
-        return isEmpty(names) ? GridFunc.<T>alwaysFalse() : new P1<T>() {
-            @Override public boolean apply(T e) {
-                assert names != null;
-
-                for (String name : names)
-                    if (!e.hasMeta(name))
-                        return false;
-
-                return true;
-            }
-        };
-    }
-
-    /**
      * Adds (copies) to given collection all elements in <tt>'from'</tt> array.
      *
      * @param to Collection to copy to.


Mime
View raw message