ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/3] incubator-ignite git commit: ignite-290 Removed unused API
Date Wed, 18 Feb 2015 10:13:23 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-290 [created] beb3e47c4


ignite-290 Removed unused API


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

Branch: refs/heads/ignite-290
Commit: ee6c19d8345cc5d1f743aa772b2e7846a8992e20
Parents: e3a6c22
Author: avinogradov <avinogradov@gridgain.com>
Authored: Tue Feb 17 18:18:36 2015 +0300
Committer: avinogradov <avinogradov@gridgain.com>
Committed: Tue Feb 17 18:18:36 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheEntryEx.java      | 13 --------
 .../processors/cache/GridCacheMapEntry.java     | 20 ------------
 .../util/lang/GridMetadataAwareAdapter.java     | 33 +-------------------
 3 files changed, 1 insertion(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee6c19d8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index f044347..68e4f97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -985,19 +985,6 @@ public interface GridCacheEntryEx<K, V> {
     @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.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee6c19d8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index dc0fa59..a1cc776 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -4025,26 +4025,6 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K,
V>
     }
 
     /** {@inheritDoc} */
-    @SuppressWarnings({"unchecked", "ClassReferencesSubclass"})
-    @Nullable @Override public <V1> V1 putMetaIfAbsent(String name, Callable<V1>
c) {
-        A.notNull(name, "name", c, "c");
-
-        synchronized (this) {
-            V1 v = meta(name);
-
-            if (v == null)
-                try {
-                    return addMeta(name, 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/ee6c19d8/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
index 5dadc48..9af450e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
@@ -265,38 +265,7 @@ public class GridMetadataAwareAdapter {
     }
 
     /**
-     * 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.
-     */
-    @SuppressWarnings({"unchecked", "ClassReferencesSubclass"})
-    @Nullable public <V> V putMetaIfAbsent(String name, Callable<V> c) {
-        A.notNull(name, "name", c, "c");
-
-        synchronized (mux) {
-            V v = (V) meta(name);
-
-            if (v == null)
-                try {
-                    return addMeta(name, c.call());
-                }
-                catch (Exception e) {
-                    throw F.wrap(e);
-                }
-
-            return v;
-        }
-    }
-
-    /**
-     * Adds given metadata value only if it was absent. Unlike
-     * {@link #putMetaIfAbsent(String, Callable)}, this method always returns
+     * Adds given metadata value only if it was absent. This method always returns
      * the latest value and never previous one.
      *
      * @param name Metadata name.


Mime
View raw message