ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [47/50] [abbrv] incubator-ignite git commit: Merge branch 'sprint-1' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-52
Date Thu, 05 Feb 2015 21:59:43 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
index 37007ae,0b59564..45a3e25
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
@@@ -343,15 -349,9 +345,15 @@@ public interface CacheProjection<K, V> 
       * @param key Key.
       * @return Future.
       */
-     public IgniteFuture<Boolean> containsKeyAsync(K key);
+     public IgniteInternalFuture<Boolean> containsKeyAsync(K key);
  
      /**
 +     * @param keys Keys to check.
 +     * @return Future.
 +     */
 +    public IgniteFuture<Map<K, Boolean>> containsKeysAsync(Collection<? extends
K> keys);
 +
 +    /**
       * Returns {@code true} if this cache contains given value.
       *
       * @param val Value to check.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index c713c96,ae9e4b9..f0b46d8
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@@ -1422,10 -1626,20 +1642,10 @@@ public abstract class GridCacheAdapter<
      }
  
      /** {@inheritDoc} */
-     @Override public IgniteFuture<Map<K, V>> getAllOutTxAsync(List<K>
keys) {
+     @Override public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(List<K>
keys) {
          String taskName = ctx.kernalContext().job().currentTaskName();
  
 -        return getAllAsync(keys, !ctx.config().isReadFromBackup(), /*skip tx*/true, null,
null, taskName, true);
 -    }
 -
 -    /** {@inheritDoc} */
 -    @Nullable @Override public V reload(K key) throws IgniteCheckedException {
 -        return reload(key, (IgnitePredicate<CacheEntry<K, V>>[])null);
 -    }
 -
 -    /** {@inheritDoc} */
 -    @Override public IgniteInternalFuture<V> reloadAsync(K key) {
 -        return reloadAsync(key, (IgnitePredicate<CacheEntry<K, V>>[])null);
 +        return getAllAsync(keys, !ctx.config().isReadFromBackup(), /*skip tx*/true, null,
null, taskName, true, false);
      }
  
      /** {@inheritDoc} */
@@@ -1441,10 -1660,10 +1661,10 @@@
      }
  
      /** {@inheritDoc} */
-     @Override public IgniteFuture<?> reloadAllAsync() {
+     @Override public IgniteInternalFuture<?> reloadAllAsync() {
          ctx.denyOnFlags(F.asList(LOCAL, READ));
  
 -        return reloadAllAsync(keySet(), (IgnitePredicate<CacheEntry<K, V>>[])null);
 +        return reloadAllAsync(keySet());
      }
  
      /**
@@@ -1456,10 -1676,10 +1676,10 @@@
       * @param vis Visitor.
       * @return Future.
       */
-     public IgniteFuture<Object> readThroughAllAsync(final Collection<? extends
K> keys,
+     public IgniteInternalFuture<Object> readThroughAllAsync(final Collection<?
extends K> keys,
          boolean reload,
 +        boolean skipVals,
-         @Nullable final IgniteTxEx<K, V> tx,
+         @Nullable final IgniteInternalTx<K, V> tx,
 -        IgnitePredicate<CacheEntry<K, V>>[] filter,
          @Nullable UUID subjId,
          String taskName,
          final IgniteBiInClosure<K, V> vis) {
@@@ -1670,7 -1900,13 +1890,13 @@@
  
      /** {@inheritDoc} */
      @Nullable @Override public V get(K key) throws IgniteCheckedException {
+         A.notNull(key, "key");
+ 
+         boolean statsEnabled = ctx.config().isStatisticsEnabled();
+ 
+         long start = statsEnabled ? System.nanoTime() : 0L;
+ 
 -        V val = get(key, true, null);
 +        V val = get(key, true);
  
          if (ctx.config().getInterceptor() != null)
              val = (V)ctx.config().getInterceptor().onGet(key, val);
@@@ -1679,12 -1918,18 +1908,20 @@@
      }
  
      /** {@inheritDoc} */
 -    @Override public IgniteInternalFuture<V> getAsync(final K key) {
 +    @Override public IgniteFuture<V> getAsync(final K key) {
+         A.notNull(key, "key");
++        
 +        IgniteFuture<V> fut = getAsync(key, true);
  
+         final boolean statsEnabled = ctx.config().isStatisticsEnabled();
+ 
+         final long start = statsEnabled ? System.nanoTime() : 0L;
+ 
+         IgniteInternalFuture<V> fut = getAsync(key, true, null);
+ 
          if (ctx.config().getInterceptor() != null)
-             return fut.chain(new CX1<IgniteFuture<V>, V>() {
-                 @Override public V applyx(IgniteFuture<V> f) throws IgniteCheckedException
{
+             fut =  fut.chain(new CX1<IgniteInternalFuture<V>, V>() {
+                 @Override public V applyx(IgniteInternalFuture<V> f) throws IgniteCheckedException
{
                      return (V)ctx.config().getInterceptor().onGet(key, f.get());
                  }
              });
@@@ -1694,7 -1942,13 +1934,13 @@@
  
      /** {@inheritDoc} */
      @Override public Map<K, V> getAll(@Nullable Collection<? extends K> keys)
throws IgniteCheckedException {
+         A.notNull(keys, "keys");
+ 
+         boolean statsEnabled = ctx.config().isStatisticsEnabled();
+ 
+         long start = statsEnabled ? System.nanoTime() : 0L;
+ 
 -        Map<K, V> map = getAll(keys, true, null);
 +        Map<K, V> map = getAll(keys, true);
  
          if (ctx.config().getInterceptor() != null)
              map = interceptGet(keys, map);
@@@ -1703,12 -1960,18 +1952,18 @@@
      }
  
      /** {@inheritDoc} */
 -    @Override public IgniteInternalFuture<Map<K, V>> getAllAsync(@Nullable final
Collection<? extends K> keys) {
 +    @Override public IgniteFuture<Map<K, V>> getAllAsync(@Nullable final Collection<?
extends K> keys) {
+         A.notNull(keys, "keys");
 -
++        
+         final boolean statsEnabled = ctx.config().isStatisticsEnabled();
+ 
+         final long start = statsEnabled ? System.nanoTime() : 0L;
+ 
 -        IgniteInternalFuture<Map<K, V>> fut = getAllAsync(keys, true, null);
 +        IgniteFuture<Map<K, V>> fut = getAllAsync(keys, true);
  
          if (ctx.config().getInterceptor() != null)
-             return fut.chain(new CX1<IgniteFuture<Map<K, V>>, Map<K, V>>()
{
-                 @Override public Map<K, V> applyx(IgniteFuture<Map<K, V>>
f) throws IgniteCheckedException {
+             return fut.chain(new CX1<IgniteInternalFuture<Map<K, V>>, Map<K,
V>>() {
+                 @Override public Map<K, V> applyx(IgniteInternalFuture<Map<K,
V>> f) throws IgniteCheckedException {
                      return interceptGet(keys, f.get());
                  }
              });
@@@ -2252,14 -2562,13 +2536,14 @@@
          return syncOp(new SyncOp<Map<K, EntryProcessorResult<T>>>(keys.size()
== 1) {
              @Nullable @Override public Map<K, EntryProcessorResult<T>> op(IgniteTxLocalAdapter
tx)
                  throws IgniteCheckedException {
 -                Map<? extends K, EntryProcessor<K, V, Object>> invokeMap = F.viewAsMap(keys,
new C1<K, EntryProcessor<K, V, Object>>() {
 -                    @Override public EntryProcessor apply(K k) {
 -                        return entryProcessor;
 -                    }
 -                });
 +                Map<? extends K, EntryProcessor<K, V, Object>> invokeMap = F.viewAsMap(keys,
 +                    new C1<K, EntryProcessor<K, V, Object>>() {
 +                        @Override public EntryProcessor apply(K k) {
 +                            return entryProcessor;
 +                        }
 +                    });
  
-                 IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut =
+                 IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut =
                      tx.invokeAsync(ctx, invokeMap, args);
  
                  Map<K, EntryProcessorResult<T>> res = fut.get().value();
@@@ -2295,27 -2604,25 +2579,25 @@@
              }
          });
  
-         IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut0 =
-             (IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)fut;
+         IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut0 =
+             (IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)fut;
  
-         return fut0.chain(
-             new CX1<IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>,
EntryProcessorResult<T>>() {
-                 @Override public EntryProcessorResult<T> applyx(
-                     IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut)
-                     throws IgniteCheckedException {
-                     GridCacheReturn<Map<K, EntryProcessorResult<T>>> ret
= fut.get();
 -        return fut0.chain(new CX1<IgniteInternalFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>>, EntryProcessorResult<T>>() {
 -            @Override public EntryProcessorResult<T> applyx(IgniteInternalFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>> fut)
++        return fut0.chain(new CX1<IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>,
EntryProcessorResult<T>>() {
++            @Override public EntryProcessorResult<T> applyx(IgniteFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>> fut)
+                 throws IgniteCheckedException {
+                 GridCacheReturn<Map<K, EntryProcessorResult<T>>> ret =
fut.get();
  
 -                Map<K, EntryProcessorResult<T>> resMap = ret.value();
 +                    Map<K, EntryProcessorResult<T>> resMap = ret.value();
  
 -                if (resMap != null) {
 -                    assert resMap.isEmpty() || resMap.size() == 1 : resMap.size();
 +                    if (resMap != null) {
 +                        assert resMap.isEmpty() || resMap.size() == 1 : resMap.size();
  
 -                    return resMap.isEmpty() ? null : resMap.values().iterator().next();
 -                }
 +                        return resMap.isEmpty() ? null : resMap.values().iterator().next();
 +                    }
  
 -                return null;
 -            }
 -        });
 +                    return null;
 +                }
 +            });
      }
  
      /** {@inheritDoc} */
@@@ -2346,21 -2653,19 +2628,19 @@@
              }
          });
  
-         IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut0 =
-             (IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)fut;
+         IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut0 =
+             (IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)fut;
  
-         return fut0.chain(
-             new CX1<IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>,
Map<K, EntryProcessorResult<T>>>() {
-                 @Override public Map<K, EntryProcessorResult<T>> applyx(
-                     IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut)
-                     throws IgniteCheckedException {
-                     GridCacheReturn<Map<K, EntryProcessorResult<T>>> ret
= fut.get();
 -        return fut0.chain(new CX1<IgniteInternalFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>>, Map<K, EntryProcessorResult<T>>>()
{
 -            @Override public Map<K, EntryProcessorResult<T>> applyx(IgniteInternalFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>> fut)
++        return fut0.chain(new CX1<IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>,
Map<K, EntryProcessorResult<T>>>() {
++            @Override public Map<K, EntryProcessorResult<T>> applyx(IgniteFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>> fut)
+                 throws IgniteCheckedException {
+                 GridCacheReturn<Map<K, EntryProcessorResult<T>>> ret =
fut.get();
  
 -                assert ret != null;
 +                    assert ret != null;
  
 -                return ret.value() != null ? ret.value() : Collections.<K, EntryProcessorResult<T>>emptyMap();
 -            }
 -        });
 +                    return ret.value() != null ? ret.value() : Collections.<K, EntryProcessorResult<T>>emptyMap();
 +                }
 +            });
      }
  
      /** {@inheritDoc} */
@@@ -2384,21 -2689,20 +2664,19 @@@
              }
          });
  
-         IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut0 =
-             (IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)fut;
+         IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut0 =
+             (IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)fut;
  
-         return fut0.chain(
-             new CX1<IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>,
Map<K, EntryProcessorResult<T>>>() {
-                 @Override public Map<K, EntryProcessorResult<T>> applyx(
-                     IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut)
-                     throws IgniteCheckedException {
-                     GridCacheReturn<Map<K, EntryProcessorResult<T>>> ret
= fut.get();
 -        return fut0.chain(new CX1<IgniteInternalFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>>, Map<K, EntryProcessorResult<T>>>()
{
 -            @Override public Map<K, EntryProcessorResult<T>> applyx(
 -                IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
fut)
++        return fut0.chain(new CX1<IgniteFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>,
Map<K, EntryProcessorResult<T>>>() {
++            @Override public Map<K, EntryProcessorResult<T>> applyx(IgniteFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>> fut)
+                 throws IgniteCheckedException {
+                 GridCacheReturn<Map<K, EntryProcessorResult<T>>> ret =
fut.get();
  
 -                assert ret != null;
 +                    assert ret != null;
  
 -                return ret.value() != null ? ret.value() : Collections.<K, EntryProcessorResult<T>>emptyMap();
 -            }
 -        });
 +                    return ret.value() != null ? ret.value() : Collections.<K, EntryProcessorResult<T>>emptyMap();
 +                }
 +            });
      }
  
      /** {@inheritDoc} */
@@@ -2793,11 -3179,11 +3153,11 @@@
          if (keyCheck)
              validateCacheKey(key);
  
-         return ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
-             @Override public IgniteFuture<V> op(IgniteTxLocalAdapter<K, V> tx)
{
+         IgniteInternalFuture<V> fut = ctx.wrapClone(asyncOp(new AsyncOp<V>(key)
{
+             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter<K,
V> tx) {
                  // TODO should we invoke interceptor here?
                  return tx.removeAllAsync(ctx, Collections.singletonList(key), null, true,
filter)
-                     .chain((IgniteClosure<IgniteFuture<GridCacheReturn<V>>,
V>)RET2VAL);
 -                    .chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn<V>>,
V>) RET2VAL);
++                    .chain((IgniteClosure<IgniteFuture<GridCacheReturn<V>>,
V>) RET2VAL);
              }
  
              @Override public String toString() {
@@@ -3657,17 -4108,7 +4082,17 @@@
              }
  
              @Override protected void remove(Cache.Entry<K, V> item) {
 -                delegate.remove(item.getKey());
 +                GridCacheProjectionImpl<K, V> prev = ctx.gate().enter(prj);
 +
 +                try {
-                     removex(item.getKey());
++                    GridCacheAdapter.this.removex(item.getKey());
 +                }
 +                catch (IgniteCheckedException e) {
 +                    throw new CacheException(e);
 +                }
 +                finally {
 +                    ctx.gate().leave(prev);
 +                }
              }
          });
      }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 9a2061e,96ceb93..d7a2fde
--- 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
@@@ -616,8 -619,8 +618,8 @@@ public abstract class GridCacheMapEntry
       * @throws IgniteCheckedException If failed.
       */
      @SuppressWarnings({"RedundantTypeArguments"})
-     @Nullable protected V readThrough(@Nullable IgniteTxEx<K, V> tx, K key, boolean
reload, UUID subjId,
 -    @Nullable protected V readThrough(@Nullable IgniteInternalTx<K, V> tx, K key,
boolean reload,
 -        IgnitePredicate<CacheEntry<K, V>>[] filter, UUID subjId, String taskName)
throws IgniteCheckedException {
++    @Nullable protected V readThrough(@Nullable IgniteInternalTx<K, V> tx, K key,
boolean reload, UUID subjId,
 +        String taskName) throws IgniteCheckedException {
          return cctx.store().loadFromStore(tx, key);
      }
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 36770cd,5e441e1..545ddc9
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@@ -643,8 -641,8 +646,8 @@@ public class GridCacheProjectionImpl<K
      }
  
      /** {@inheritDoc} */
 -    @Override public IgniteInternalFuture<V> reloadAsync(K key) {
 +    @Override public IgniteFuture<V> reloadAsync(K key) {
-         return cache.reloadAsync(key);
+         return cache.reloadAsync(key, entryFilter(false));
      }
  
      /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 5de9af7,e673641..dc0375f
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@@ -483,9 -484,10 +484,9 @@@ public abstract class GridDhtCacheAdapt
       * @param keys {@inheritDoc}
       * @param forcePrimary {@inheritDoc}
       * @param skipTx {@inheritDoc}
 -     * @param filter {@inheritDoc}
       * @return {@inheritDoc}
       */
-     @Override public IgniteFuture<Map<K, V>> getAllAsync(
+     @Override public IgniteInternalFuture<Map<K, V>> getAllAsync(
          @Nullable Collection<? extends K> keys,
          boolean forcePrimary,
          boolean skipTx,
@@@ -611,11 -615,11 +612,11 @@@
                  req.subjectId(),
                  req.taskNameHash(),
                  false,
 -                req.filter(),
 -                expiryPlc);
 +                expiryPlc,
 +                req.skipValues());
  
-         fut.listenAsync(new CI1<IgniteFuture<Collection<GridCacheEntryInfo<K,
V>>>>() {
-             @Override public void apply(IgniteFuture<Collection<GridCacheEntryInfo<K,
V>>> f) {
+         fut.listenAsync(new CI1<IgniteInternalFuture<Collection<GridCacheEntryInfo<K,
V>>>>() {
+             @Override public void apply(IgniteInternalFuture<Collection<GridCacheEntryInfo<K,
V>>> f) {
                  GridNearGetResponse<K, V> res = new GridNearGetResponse<>(ctx.cacheId(),
                      req.futureId(),
                      req.miniId(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index 4f12edb,c1d41c6..aeca8e4
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@@ -18,11 -18,14 +18,13 @@@
  package org.apache.ignite.internal.processors.cache.distributed.dht;
  
  import org.apache.ignite.*;
 -import org.apache.ignite.cache.*;
  import org.apache.ignite.cluster.*;
+ import org.apache.ignite.internal.*;
+ import org.apache.ignite.internal.cluster.*;
  import org.apache.ignite.internal.processors.cache.*;
- import org.apache.ignite.internal.util.*;
- import org.apache.ignite.lang.*;
  import org.apache.ignite.internal.processors.cache.distributed.near.*;
+ import org.apache.ignite.internal.processors.cache.version.*;
+ import org.apache.ignite.internal.util.*;
  import org.apache.ignite.internal.util.future.*;
  import org.apache.ignite.internal.util.tostring.*;
  import org.apache.ignite.internal.util.typedef.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 09fc94c,c757ad2..0c4032d
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@@ -843,12 -865,12 +865,12 @@@ public class GridDhtAtomicCache<K, V> e
       * @param taskName Task name.
       * @param deserializePortable Deserialize portable flag.
       * @param expiryPlc Expiry policy.
 +     * @param skipVals Skip values flag.
       * @return Get future.
       */
-     private IgniteFuture<Map<K, V>> getAllAsync0(@Nullable Collection<? extends
K> keys,
+     private IgniteInternalFuture<Map<K, V>> getAllAsync0(@Nullable Collection<?
extends K> keys,
          boolean reload,
          boolean forcePrimary,
 -        @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter,
          UUID subjId,
          String taskName,
          boolean deserializePortable,
@@@ -1078,9 -1107,11 +1105,13 @@@
                          if (plc != null)
                              expiry = new UpdateExpiryPolicy(plc);
  
 +                        GridCacheReturn<Object> retVal = null;
- 
-                         if (writeThrough() && keys.size() > 1 && !ctx.dr().receiveEnabled())
{
++                        
+                         if (keys.size() > 1 &&                             //
Several keys ...
+                             writeThrough() &&                              // and
store is enabled ...
+                             !ctx.store().isLocalStore() &&                 // and
this is not local store ...
+                             !ctx.dr().receiveEnabled()  // and no DR.
+                         ) {
                              // This method can only be used when there are no replicated
entries in the batch.
                              UpdateBatchResult<K, V> updRes = updateWithBatch(node,
                                  hasNear,
@@@ -1291,9 -1322,10 +1322,9 @@@
                          req.subjectId(),
                          entryProcessor,
                          taskName,
 -                        CU.<K, V>empty(),
                          null);
  
-                     CacheInvokeEntry<K, V> invokeEntry = new CacheInvokeEntry<>(entry.key(),
old);
+                     CacheInvokeEntry<K, V> invokeEntry = new CacheInvokeEntry<>(ctx,
entry.key(), old);
  
                      V updated;
                      CacheInvokeResult invokeRes = null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 02fb6a7,abb1694..e195784
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@@ -171,16 -173,10 +173,16 @@@ public abstract class GridNearCacheAdap
  
      /** {@inheritDoc} */
      @SuppressWarnings({"unchecked", "RedundantCast"})
 -    @Override public IgniteInternalFuture<Object> readThroughAllAsync(Collection<?
extends K> keys, boolean reload,
 -        IgniteInternalTx<K, V> tx, IgnitePredicate<CacheEntry<K, V>>[]
filter, @Nullable UUID subjId, String taskName,
 -        IgniteBiInClosure<K, V> vis) {
 -        return (IgniteInternalFuture)loadAsync(tx,
 +    @Override public IgniteFuture<Object> readThroughAllAsync(
 +        Collection<? extends K> keys,
 +        boolean reload,
 +        boolean skipVals,
-         IgniteTxEx<K, V> tx,
++        IgniteInternalTx<K, V> tx,
 +        @Nullable UUID subjId,
 +        String taskName,
 +        IgniteBiInClosure<K, V> vis
 +    ) {
 +        return (IgniteFuture)loadAsync(tx,
              keys,
              reload,
              false,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
index 2a9621a,c22c3fe..1d919a6
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
@@@ -313,8 -315,8 +315,8 @@@ public class GridNearCacheEntry<K, V> e
      }
  
      /** {@inheritDoc} */
-     @Override protected V readThrough(IgniteTxEx<K, V> tx, K key, boolean reload,
+     @Override protected V readThrough(IgniteInternalTx<K, V> tx, K key, boolean reload,
 -        IgnitePredicate<CacheEntry<K, V>>[] filter, UUID subjId, String taskName)
throws IgniteCheckedException {
 +        UUID subjId, String taskName) throws IgniteCheckedException {
          return cctx.near().loadAsync(tx,
              F.asList(key),
              reload,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 1ebe76f,a2c2f8a..6ae6198
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@@ -18,13 -18,16 +18,15 @@@
  package org.apache.ignite.internal.processors.cache.distributed.near;
  
  import org.apache.ignite.*;
 -import org.apache.ignite.cache.*;
  import org.apache.ignite.cluster.*;
+ import org.apache.ignite.internal.*;
+ import org.apache.ignite.internal.cluster.*;
  import org.apache.ignite.internal.processors.cache.*;
- import org.apache.ignite.internal.util.*;
- import org.apache.ignite.lang.*;
  import org.apache.ignite.internal.processors.cache.distributed.dht.*;
  import org.apache.ignite.internal.processors.cache.transactions.*;
+ import org.apache.ignite.internal.processors.cache.version.*;
  import org.apache.ignite.internal.processors.timeout.*;
+ import org.apache.ignite.internal.util.*;
  import org.apache.ignite.internal.util.future.*;
  import org.apache.ignite.internal.util.tostring.*;
  import org.apache.ignite.internal.util.typedef.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
index 1166e11,5efbae5..6aec9cf
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@@ -18,9 -18,10 +18,9 @@@
  package org.apache.ignite.internal.processors.cache.distributed.near;
  
  import org.apache.ignite.*;
 -import org.apache.ignite.cache.*;
  import org.apache.ignite.internal.*;
  import org.apache.ignite.internal.processors.cache.*;
- import org.apache.ignite.lang.*;
+ import org.apache.ignite.internal.processors.cache.version.*;
  import org.apache.ignite.internal.util.direct.*;
  import org.apache.ignite.internal.util.tostring.*;
  import org.apache.ignite.internal.util.typedef.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
index 8e62f72,d6d7b51..04f1572
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@@ -141,12 -145,12 +144,12 @@@ public class GridNearTransactionalCache
       * @param expiryPlc Expiry policy.
       * @return Future.
       */
-     IgniteFuture<Map<K, V>> txLoadAsync(GridNearTxLocal<K, V> tx,
+     IgniteInternalFuture<Map<K, V>> txLoadAsync(GridNearTxLocal<K, V>
tx,
          @Nullable Collection<? extends K> keys,
          boolean readThrough,
 -        @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter,
          boolean deserializePortable,
 -        @Nullable IgniteCacheExpiryPolicy expiryPlc) {
 +        @Nullable IgniteCacheExpiryPolicy expiryPlc,
 +        boolean skipVals) {
          assert tx != null;
  
          GridNearGetFuture<K, V> fut = new GridNearGetFuture<>(ctx,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index bd5f22a,4a268d4..c2b3819
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@@ -1054,9 -1124,10 +1122,9 @@@ public class GridLocalAtomicCache<K, V
                              subjId,
                              entryProcessor,
                              taskName,
 -                            CU.<K, V>empty(),
                              null);
  
-                         CacheInvokeEntry<K, V> invokeEntry = new CacheInvokeEntry<>(entry.key(),
old);
+                         CacheInvokeEntry<K, V> invokeEntry = new CacheInvokeEntry<>(ctx,
entry.key(), old);
  
                          V updated;
                          CacheInvokeResult invokeRes = null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 836e708,7cbdc9e..1206284
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@@ -1314,9 -1365,10 +1365,9 @@@ public abstract class IgniteTxLocalAdap
       * @param missedMap Missed keys.
       * @param redos Keys to retry.
       * @param deserializePortable Deserialize portable flag.
 -     * @param filter Filter.
       * @return Loaded key-value pairs.
       */
-     private IgniteFuture<Map<K, V>> checkMissed(
+     private IgniteInternalFuture<Map<K, V>> checkMissed(
          final GridCacheContext<K, V> cacheCtx,
          final Map<K, V> map,
          final Map<K, GridCacheVersion> missedMap,
@@@ -1687,10 -1755,10 +1738,10 @@@
                      return new GridEmbeddedFuture<>(
                          cctx.kernalContext(),
                          // First future.
 -                        checkMissed(cacheCtx, retMap, missed, redos, deserializePortable,
filter),
 +                        checkMissed(cacheCtx, retMap, missed, redos, deserializePortable,
skipVals),
                          // Closure that returns another future, based on result from first.
                          new PMC<Map<K, V>>() {
-                             @Override public IgniteFuture<Map<K, V>> postMiss(Map<K,
V> map) {
+                             @Override public IgniteInternalFuture<Map<K, V>>
postMiss(Map<K, V> map) {
                                  if (redos.isEmpty())
                                      return new GridFinishedFuture<>(cctx.kernalContext(),
                                          Collections.<K, V>emptyMap());
@@@ -2175,13 -2246,12 +2229,13 @@@
              assert optimistic();
              assert invokeMap != null;
  
-             IgniteFuture<Boolean> fut = loadMissing(
+             IgniteInternalFuture<Boolean> fut = loadMissing(
                  cacheCtx,
 -                true,
 -                true,
 +                /*read through*/true,
 +                /*async*/true,
                  missedForInvoke,
                  deserializePortables(cacheCtx),
 +                /*skip values*/false,
                  new CI2<K, V>() {
                      @Override public void apply(K key, V val) {
                          if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
index ea51199,91a53ab..8993353
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
@@@ -67,9 -69,10 +69,9 @@@ public interface IgniteTxLocalEx<K, V> 
       * @param cached Cached entry if this method is called from entry wrapper.
       *      Cached entry is passed if and only if there is only one key in collection of
keys.
       * @param deserializePortable Deserialize portable flag.
 -     * @param filter Entry filter.
       * @return Future for this get.
       */
-     public IgniteFuture<Map<K, V>> getAllAsync(
+     public IgniteInternalFuture<Map<K, V>> getAllAsync(
          GridCacheContext<K, V> cacheCtx,
          Collection<? extends K> keys,
          @Nullable GridCacheEntryEx<K, V> cached,
@@@ -167,10 -170,9 +169,10 @@@
       * @param keys Keys.
       * @param c Closure.
       * @param deserializePortable Deserialize portable flag.
 +     * @param skipVals Skip values flag.
       * @return Future with {@code True} value if loading took place.
       */
-     public IgniteFuture<Boolean> loadMissing(
+     public IgniteInternalFuture<Boolean> loadMissing(
          GridCacheContext<K, V> cacheCtx,
          boolean readThrough,
          boolean async,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxProxyImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java
index c717e31,8804a06..e956283
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java
@@@ -85,7 -85,7 +85,7 @@@ public class GridCacheQueryInternalKeys
                      assertNotNull(g);
  
                      assertTrue("Affinity node doesn't contain internal key [key=" + internalKey
+ ", node=" + n + ']',
-                         ((GridNearCacheAdapter)((GridKernal)g).internalCache()).dht().containsKey(internalKey));
 -                        ((GridNearCacheAdapter)((IgniteKernal)g).internalCache()).dht().containsKey(internalKey,
null));
++                        ((GridNearCacheAdapter)((IgniteKernal)g).internalCache()).dht().containsKey(internalKey));
                  }
              }
          }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/df56d897/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
----------------------------------------------------------------------


Mime
View raw message