http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java index 7c77dbc..d5e9714 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java @@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.dht.preloader; import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.events.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.lang.*; @@ -261,12 +262,12 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { /** * @return Start future. */ - @Override public IgniteFuture<Object> startFuture() { + @Override public IgniteInternalFuture<Object> startFuture() { return startFut; } /** {@inheritDoc} */ - @Override public IgniteFuture<?> syncFuture() { + @Override public IgniteInternalFuture<?> syncFuture() { return demandPool.syncFuture(); } @@ -315,13 +316,13 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { * @param msg Force keys message. */ private void processForceKeysRequest(final ClusterNode node, final GridDhtForceKeysRequest<K, V> msg) { - IgniteFuture<?> fut = cctx.mvcc().finishKeys(msg.keys(), msg.topologyVersion()); + IgniteInternalFuture<?> fut = cctx.mvcc().finishKeys(msg.keys(), msg.topologyVersion()); if (fut.isDone()) processForceKeysRequest0(node, msg); else - fut.listenAsync(new CI1<IgniteFuture<?>>() { - @Override public void apply(IgniteFuture<?> t) { + fut.listenAsync(new CI1<IgniteInternalFuture<?>>() { + @Override public void apply(IgniteInternalFuture<?> t) { processForceKeysRequest0(node, msg); } }); @@ -426,8 +427,8 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { if (log.isDebugEnabled()) log.debug("Processing affinity assignment request [node=" + node + ", req=" + req + ']'); - cctx.affinity().affinityReadyFuture(req.topologyVersion()).listenAsync(new CI1<IgniteFuture<Long>>() { - @Override public void apply(IgniteFuture<Long> fut) { + cctx.affinity().affinityReadyFuture(req.topologyVersion()).listenAsync(new CI1<IgniteInternalFuture<Long>>() { + @Override public void apply(IgniteInternalFuture<Long> fut) { if (log.isDebugEnabled()) log.debug("Affinity is ready for topology version, will send response [topVer=" + topVer + ", node=" + node + ']'); @@ -481,27 +482,27 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K, V> { @Override public GridDhtFuture<Object> request(Collection<? extends K> keys, long topVer) { final GridDhtForceKeysFuture<K, V> fut = new GridDhtForceKeysFuture<>(cctx, topVer, keys, this); - IgniteFuture<?> topReadyFut = cctx.affinity().affinityReadyFuturex(topVer); + IgniteInternalFuture<?> topReadyFut = cctx.affinity().affinityReadyFuturex(topVer); if (startFut.isDone() && topReadyFut == null) fut.init(); else { if (topReadyFut == null) - startFut.listenAsync(new CI1<IgniteFuture<?>>() { - @Override public void apply(IgniteFuture<?> syncFut) { + startFut.listenAsync(new CI1<IgniteInternalFuture<?>>() { + @Override public void apply(IgniteInternalFuture<?> syncFut) { fut.init(); } }); else { GridCompoundFuture<Object, Object> compound = new GridCompoundFuture<>(cctx.kernalContext()); - compound.add((IgniteFuture<Object>)startFut); - compound.add((IgniteFuture<Object>)topReadyFut); + compound.add((IgniteInternalFuture<Object>)startFut); + compound.add((IgniteInternalFuture<Object>)topReadyFut); compound.markInitialized(); - compound.listenAsync(new CI1<IgniteFuture<?>>() { - @Override public void apply(IgniteFuture<?> syncFut) { + compound.listenAsync(new CI1<IgniteInternalFuture<?>>() { + @Override public void apply(IgniteInternalFuture<?> syncFut) { fut.init(); } });
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java index 9ab8d86..5d8d96f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java @@ -19,6 +19,7 @@ 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.internal.processors.cache.version.*; import org.apache.ignite.internal.util.*; @@ -362,7 +363,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override protected IgniteFuture<Map<K, V>> getAllAsync( + @Override protected IgniteInternalFuture<Map<K, V>> getAllAsync( @Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @@ -422,7 +423,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<V> putAsync(K key, + @Override public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl, @@ -432,7 +433,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<Boolean> putxAsync(K key, + @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl, @@ -446,7 +447,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<V> putIfAbsentAsync(K key, V val) { + @Override public IgniteInternalFuture<V> putIfAbsentAsync(K key, V val) { return dht.putIfAbsentAsync(key, val); } @@ -456,7 +457,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val) { + @Override public IgniteInternalFuture<Boolean> putxIfAbsentAsync(K key, V val) { return dht.putxIfAbsentAsync(key, val); } @@ -466,7 +467,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<V> replaceAsync(K key, V val) { + @Override public IgniteInternalFuture<V> replaceAsync(K key, V val) { return dht.replaceAsync(key, val); } @@ -476,7 +477,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> replacexAsync(K key, V val) { + @Override public IgniteInternalFuture<Boolean> replacexAsync(K key, V val) { return dht.replacexAsync(key, val); } @@ -486,7 +487,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) { + @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) { return dht.replaceAsync(key, oldVal, newVal); } @@ -502,13 +503,13 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val) { + @Override public IgniteInternalFuture<GridCacheReturn<V>> removexAsync(K key, V val) { return dht.removexAsync(key, val); } /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) { + @Override public IgniteInternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) { return dht.replacexAsync(key, oldVal, newVal); } @@ -519,7 +520,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> putAllAsync(Map<? extends K, ? extends V> m, + @Override public IgniteInternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m, @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) { return dht.putAllAsync(m, filter); } @@ -530,7 +531,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) throws IgniteCheckedException { + @Override public IgniteInternalFuture<?> putAllDrAsync(Map<? extends K, GridCacheDrInfo<V>> drMap) throws IgniteCheckedException { return dht.putAllDrAsync(drMap); } @@ -549,14 +550,14 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public <T> IgniteFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync( + @Override public <T> IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync( Map<? extends K, ? extends EntryProcessor<K, V, T>> map, Object... args) { return dht.invokeAllAsync(map, args); } /** {@inheritDoc} */ - @Override public <T> IgniteFuture<EntryProcessorResult<T>> invokeAsync(K key, + @Override public <T> IgniteInternalFuture<EntryProcessorResult<T>> invokeAsync(K key, EntryProcessor<K, V, T> entryProcessor, Object... args) throws EntryProcessorException { return dht.invokeAsync(key, entryProcessor, args); @@ -570,7 +571,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public <T> IgniteFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys, + @Override public <T> IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys, EntryProcessor<K, V, T> entryProcessor, Object... args) { return dht.invokeAllAsync(keys, entryProcessor, args); @@ -585,7 +586,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<V> removeAsync(K key, + @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { return dht.removeAsync(key, entry, filter); @@ -598,7 +599,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> removeAllAsync(Collection<? extends K> keys, + @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys, IgnitePredicate<CacheEntry<K, V>>[] filter) { return dht.removeAllAsync(keys, filter); } @@ -612,7 +613,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<Boolean> removexAsync(K key, + @Override public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { return dht.removexAsync(key, entry, filter); @@ -624,7 +625,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> removeAsync(K key, V val) { + @Override public IgniteInternalFuture<Boolean> removeAsync(K key, V val) { return dht.removeAsync(key, val); } @@ -634,7 +635,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> removeAllAsync(IgnitePredicate<CacheEntry<K, V>>[] filter) { + @Override public IgniteInternalFuture<?> removeAllAsync(IgnitePredicate<CacheEntry<K, V>>[] filter) { return dht.removeAllAsync(keySet(filter)); } @@ -644,12 +645,12 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException { + @Override public IgniteInternalFuture<?> removeAllDrAsync(Map<? extends K, GridCacheVersion> drMap) throws IgniteCheckedException { return dht.removeAllDrAsync(drMap); } /** {@inheritDoc} */ - @Override protected IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, + @Override protected IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, @Nullable IgniteTxLocalEx<K, V> tx, boolean isInvalidate, http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java ---------------------------------------------------------------------- diff --git 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 index 9fa97cd..7d7fb35 100644 --- 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 @@ -19,6 +19,7 @@ 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.internal.processors.cache.distributed.*; import org.apache.ignite.internal.processors.cache.version.*; @@ -172,10 +173,10 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda /** {@inheritDoc} */ @SuppressWarnings({"unchecked", "RedundantCast"}) - @Override public IgniteFuture<Object> readThroughAllAsync(Collection<? extends K> keys, boolean reload, + @Override public IgniteInternalFuture<Object> readThroughAllAsync(Collection<? extends K> keys, boolean reload, IgniteTxEx<K, V> tx, IgnitePredicate<CacheEntry<K, V>>[] filter, @Nullable UUID subjId, String taskName, IgniteBiInClosure<K, V> vis) { - return (IgniteFuture)loadAsync(tx, + return (IgniteInternalFuture)loadAsync(tx, keys, reload, false, @@ -196,7 +197,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys, + @Override public IgniteInternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { GridCompoundFuture fut = new GridCompoundFuture(ctx.kernalContext()); @@ -235,7 +236,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda /** {@inheritDoc} */ @SuppressWarnings({"unchecked"}) - @Override public IgniteFuture<?> reloadAllAsync() { + @Override public IgniteInternalFuture<?> reloadAllAsync() { GridCompoundFuture fut = new GridCompoundFuture(ctx.kernalContext()); fut.add(super.reloadAllAsync()); @@ -248,7 +249,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda /** {@inheritDoc} */ @SuppressWarnings({"unchecked"}) - @Override public IgniteFuture<?> reloadAllAsync(@Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + @Override public IgniteInternalFuture<?> reloadAllAsync(@Nullable IgnitePredicate<CacheEntry<K, V>> filter) { GridCompoundFuture fut = new GridCompoundFuture(ctx.kernalContext()); fut.add(super.reloadAllAsync()); @@ -271,7 +272,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda * @param expiryPlc Expiry policy. * @return Loaded values. */ - public IgniteFuture<Map<K, V>> loadAsync(@Nullable IgniteTxEx tx, + public IgniteInternalFuture<Map<K, V>> loadAsync(@Nullable IgniteTxEx tx, @Nullable Collection<? extends K> keys, boolean reload, boolean forcePrimary, @@ -319,7 +320,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda } /** {@inheritDoc} */ - @Override public IgniteFuture<?> loadCacheAsync(IgniteBiPredicate<K, V> p, long ttl, Object[] args) { + @Override public IgniteInternalFuture<?> loadCacheAsync(IgniteBiPredicate<K, V> p, long ttl, Object[] args) { return dht().loadCacheAsync(p, ttl, args); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java ---------------------------------------------------------------------- diff --git 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 index 7eb5013..bdb6e7a 100644 --- 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 @@ -20,6 +20,7 @@ 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.processors.cache.*; import org.apache.ignite.internal.processors.cache.version.*; import org.apache.ignite.internal.util.*; @@ -204,8 +205,8 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma /** {@inheritDoc} */ @Override public Collection<? extends ClusterNode> nodes() { return - F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<Map<K, V>>, ClusterNode>() { - @Nullable @Override public ClusterNode apply(IgniteFuture<Map<K, V>> f) { + F.viewReadOnly(futures(), new IgniteClosure<IgniteInternalFuture<Map<K, V>>, ClusterNode>() { + @Nullable @Override public ClusterNode apply(IgniteInternalFuture<Map<K, V>> f) { if (isMini(f)) return ((MiniFuture)f).node(); @@ -216,7 +217,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma /** {@inheritDoc} */ @Override public boolean onNodeLeft(UUID nodeId) { - for (IgniteFuture<Map<K, V>> fut : futures()) + for (IgniteInternalFuture<Map<K, V>> fut : futures()) if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -235,7 +236,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma * @param res Result. */ void onResult(UUID nodeId, GridNearGetResponse<K, V> res) { - for (IgniteFuture<Map<K, V>> fut : futures()) + for (IgniteInternalFuture<Map<K, V>> fut : futures()) if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -266,7 +267,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma * @param f Future. * @return {@code True} if mini-future. */ - private boolean isMini(IgniteFuture<Map<K, V>> f) { + private boolean isMini(IgniteInternalFuture<Map<K, V>> f) { return f.getClass().equals(MiniFuture.class); } @@ -357,8 +358,8 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma } // Add new future. - add(fut.chain(new C1<IgniteFuture<Collection<GridCacheEntryInfo<K, V>>>, Map<K, V>>() { - @Override public Map<K, V> apply(IgniteFuture<Collection<GridCacheEntryInfo<K, V>>> fut) { + add(fut.chain(new C1<IgniteInternalFuture<Collection<GridCacheEntryInfo<K, V>>>, Map<K, V>>() { + @Override public Map<K, V> apply(IgniteInternalFuture<Collection<GridCacheEntryInfo<K, V>>> fut) { try { return loadEntries(n.id(), mappedKeys.keySet(), fut.get(), saved, topVer); } @@ -756,8 +757,8 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma else { final RemapTimeoutObject timeout = new RemapTimeoutObject(ctx.config().getNetworkTimeout(), topVer, e); - ctx.discovery().topologyFuture(topVer + 1).listenAsync(new CI1<IgniteFuture<Long>>() { - @Override public void apply(IgniteFuture<Long> longIgniteFuture) { + ctx.discovery().topologyFuture(topVer + 1).listenAsync(new CI1<IgniteInternalFuture<Long>>() { + @Override public void apply(IgniteInternalFuture<Long> longIgniteFuture) { if (timeout.finish()) { ctx.timeout().removeTimeoutObject(timeout); @@ -806,10 +807,10 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma log.debug("Remapping mini get future [invalidParts=" + invalidParts + ", fut=" + this + ']'); // Need to wait for next topology version to remap. - IgniteFuture<Long> topFut = ctx.discovery().topologyFuture(rmtTopVer); + IgniteInternalFuture<Long> topFut = ctx.discovery().topologyFuture(rmtTopVer); - topFut.listenAsync(new CIX1<IgniteFuture<Long>>() { - @Override public void applyx(IgniteFuture<Long> fut) throws IgniteCheckedException { + topFut.listenAsync(new CIX1<IgniteInternalFuture<Long>>() { + @Override public void applyx(IgniteInternalFuture<Long> fut) throws IgniteCheckedException { long readyTopVer = fut.get(); // This will append new futures to compound list. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java index e34f775..d1b56e5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java @@ -20,6 +20,7 @@ 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.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.*; import org.apache.ignite.internal.processors.cache.version.*; @@ -186,8 +187,8 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B */ @Override public Collection<? extends ClusterNode> nodes() { return - F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() { - @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) { + F.viewReadOnly(futures(), new IgniteClosure<IgniteInternalFuture<?>, ClusterNode>() { + @Nullable @Override public ClusterNode apply(IgniteInternalFuture<?> f) { if (isMini(f)) return ((MiniFuture)f).node(); @@ -415,7 +416,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B @Override public boolean onNodeLeft(UUID nodeId) { boolean found = false; - for (IgniteFuture<?> fut : futures()) { + for (IgniteInternalFuture<?> fut : futures()) { if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -449,7 +450,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B if (log.isDebugEnabled()) log.debug("Received lock response from node [nodeId=" + nodeId + ", res=" + res + ", fut=" + this + ']'); - for (IgniteFuture<Boolean> fut : pending()) { + for (IgniteInternalFuture<Boolean> fut : pending()) { if (isMini(fut)) { MiniFuture mini = (MiniFuture)fut; @@ -640,7 +641,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B * @param f Future. * @return {@code True} if mini-future. */ - private boolean isMini(IgniteFuture<?> f) { + private boolean isMini(IgniteInternalFuture<?> f) { return f.getClass().equals(MiniFuture.class); } @@ -700,8 +701,8 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B markInitialized(); } else { - fut.listenAsync(new CI1<IgniteFuture<Long>>() { - @Override public void apply(IgniteFuture<Long> t) { + fut.listenAsync(new CI1<IgniteInternalFuture<Long>>() { + @Override public void apply(IgniteInternalFuture<Long> t) { mapOnTopology(); } }); @@ -968,7 +969,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B if (log.isDebugEnabled()) log.debug("Before locally locking near request: " + req); - IgniteFuture<GridNearLockResponse<K, V>> fut = dht().lockAllAsync(cctx, cctx.localNode(), req, filter); + IgniteInternalFuture<GridNearLockResponse<K, V>> fut = dht().lockAllAsync(cctx, cctx.localNode(), req, filter); // Add new future. add(new GridEmbeddedFuture<>( @@ -1109,7 +1110,7 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B add(fut); // Append new future. - IgniteFuture<?> txSync = null; + IgniteInternalFuture<?> txSync = null; if (inTx()) txSync = cctx.tm().awaitFinishAckAsync(node.id(), tx.threadId()); @@ -1128,8 +1129,8 @@ public final class GridNearLockFuture<K, V> extends GridCompoundIdentityFuture<B } } else { - txSync.listenAsync(new CI1<IgniteFuture<?>>() { - @Override public void apply(IgniteFuture<?> t) { + txSync.listenAsync(new CI1<IgniteInternalFuture<?>>() { + @Override public void apply(IgniteInternalFuture<?> t) { try { if (log.isDebugEnabled()) log.debug("Sending near lock request [node=" + node.id() + ", req=" + req + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java ---------------------------------------------------------------------- diff --git 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 index df26576..d790ac3 100644 --- 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 @@ -20,6 +20,7 @@ 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.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.*; import org.apache.ignite.internal.processors.cache.version.*; @@ -93,7 +94,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V> } /** {@inheritDoc} */ - @Override public IgniteFuture<Map<K, V>> getAllAsync( + @Override public IgniteInternalFuture<Map<K, V>> getAllAsync( @Nullable final Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @@ -113,7 +114,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V> if (tx != null && !tx.implicit() && !skipTx) { return asyncOp(tx, new AsyncOp<Map<K, V>>(keys) { - @Override public IgniteFuture<Map<K, V>> op(IgniteTxLocalAdapter<K, V> tx) { + @Override public IgniteInternalFuture<Map<K, V>> op(IgniteTxLocalAdapter<K, V> tx) { return ctx.wrapCloneMap(tx.getAllAsync(ctx, keys, entry, deserializePortable, filter)); } }); @@ -143,7 +144,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V> * @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, @@ -407,7 +408,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V> } /** {@inheritDoc} */ - @Override protected IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, + @Override protected IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, IgniteTxLocalEx<K, V> tx, boolean isInvalidate, http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java index 7e76518..ae0efd5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near; import org.apache.ignite.*; import org.apache.ignite.cluster.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.*; import org.apache.ignite.internal.processors.cache.version.*; @@ -119,8 +120,8 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu */ @Override public Collection<? extends ClusterNode> nodes() { return - F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() { - @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) { + F.viewReadOnly(futures(), new IgniteClosure<IgniteInternalFuture<?>, ClusterNode>() { + @Nullable @Override public ClusterNode apply(IgniteInternalFuture<?> f) { if (isMini(f)) return ((MiniFuture)f).node(); @@ -131,7 +132,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu /** {@inheritDoc} */ @Override public boolean onNodeLeft(UUID nodeId) { - for (IgniteFuture<?> fut : futures()) + for (IgniteInternalFuture<?> fut : futures()) if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -198,7 +199,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu */ public void onResult(UUID nodeId, GridNearTxFinishResponse<K, V> res) { if (!isDone()) - for (IgniteFuture<IgniteTx> fut : futures()) { + for (IgniteInternalFuture<IgniteTx> fut : futures()) { if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -254,7 +255,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu * @param f Future. * @return {@code True} if mini-future. */ - private boolean isMini(IgniteFuture<?> f) { + private boolean isMini(IgniteInternalFuture<?> f) { return f.getClass().equals(MiniFuture.class); } @@ -281,7 +282,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu // Finish local mapping only as we need send commit message to backups. for (GridDistributedTxMapping<K, V> m : mappings.values()) { if (m.node().isLocal()) { - IgniteFuture<IgniteTx> fut = cctx.tm().txHandler().finishColocatedLocal(commit, tx); + IgniteInternalFuture<IgniteTx> fut = cctx.tm().txHandler().finishColocatedLocal(commit, tx); // Add new future. if (fut != null) @@ -302,7 +303,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu if (!isSync()) { boolean complete = true; - for (IgniteFuture<?> f : pending()) + for (IgniteInternalFuture<?> f : pending()) // Mini-future in non-sync mode gets done when message gets sent. if (isMini(f) && !f.isDone()) complete = false; @@ -368,7 +369,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu if (n.isLocal()) { req.miniId(IgniteUuid.randomUuid()); - IgniteFuture<IgniteTx> fut = cctx.tm().txHandler().finish(n.id(), tx, req); + IgniteInternalFuture<IgniteTx> fut = cctx.tm().txHandler().finish(n.id(), tx, req); // Add new future. if (fut != null) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java index 3c967df..ac5404b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java @@ -61,7 +61,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { new ConcurrentHashMap8<>(); /** Future. */ - private final AtomicReference<IgniteFuture<IgniteTxEx<K, V>>> prepFut = + private final AtomicReference<IgniteInternalFuture<IgniteTxEx<K, V>>> prepFut = new AtomicReference<>(); /** */ @@ -181,7 +181,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { } /** {@inheritDoc} */ - @Override protected IgniteFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached, + @Override protected IgniteInternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached, IgniteTxEntry<K, V> entry, long topVer) { // We are in near transaction, do not add local node as reader. return null; @@ -278,7 +278,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> loadMissing( + @Override public IgniteInternalFuture<Boolean> loadMissing( GridCacheContext<K, V> cacheCtx, boolean readThrough, boolean async, @@ -292,8 +292,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { readThrough, CU.<K, V>empty(), deserializePortable, - accessPolicy(cacheCtx, keys)).chain(new C1<IgniteFuture<Map<K, V>>, Boolean>() { - @Override public Boolean apply(IgniteFuture<Map<K, V>> f) { + accessPolicy(cacheCtx, keys)).chain(new C1<IgniteInternalFuture<Map<K, V>>, Boolean>() { + @Override public Boolean apply(IgniteInternalFuture<Map<K, V>> f) { try { Map<K, V> map = f.get(); @@ -322,8 +322,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { resolveTaskName(), deserializePortable, null, - accessPolicy(cacheCtx, keys)).chain(new C1<IgniteFuture<Map<K, V>>, Boolean>() { - @Override public Boolean apply(IgniteFuture<Map<K, V>> f) { + accessPolicy(cacheCtx, keys)).chain(new C1<IgniteInternalFuture<Map<K, V>>, Boolean>() { + @Override public Boolean apply(IgniteInternalFuture<Map<K, V>> f) { try { Map<K, V> map = f.get(); @@ -694,8 +694,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<IgniteTxEx<K, V>> prepareAsync() { - IgniteFuture<IgniteTxEx<K, V>> fut = prepFut.get(); + @Override public IgniteInternalFuture<IgniteTxEx<K, V>> prepareAsync() { + IgniteInternalFuture<IgniteTxEx<K, V>> fut = prepFut.get(); if (fut == null) { // Future must be created before any exception can be thrown. @@ -762,7 +762,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings({"ThrowableInstanceNeverThrown"}) - @Override public IgniteFuture<IgniteTx> commitAsync() { + @Override public IgniteInternalFuture<IgniteTx> commitAsync() { if (log.isDebugEnabled()) log.debug("Committing near local tx: " + this); @@ -775,10 +775,10 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { cctx.mvcc().addFuture(fut); - IgniteFuture<IgniteTxEx<K, V>> prepareFut = prepFut.get(); + IgniteInternalFuture<IgniteTxEx<K, V>> prepareFut = prepFut.get(); - prepareFut.listenAsync(new CI1<IgniteFuture<IgniteTxEx<K, V>>>() { - @Override public void apply(IgniteFuture<IgniteTxEx<K, V>> f) { + prepareFut.listenAsync(new CI1<IgniteInternalFuture<IgniteTxEx<K, V>>>() { + @Override public void apply(IgniteInternalFuture<IgniteTxEx<K, V>> f) { GridNearTxFinishFuture<K, V> fut0 = commitFut.get(); try { @@ -808,7 +808,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<IgniteTx> rollbackAsync() { + @Override public IgniteInternalFuture<IgniteTx> rollbackAsync() { if (log.isDebugEnabled()) log.debug("Rolling back near tx: " + this); @@ -822,7 +822,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { cctx.mvcc().addFuture(fut); - IgniteFuture<IgniteTxEx<K, V>> prepFut = this.prepFut.get(); + IgniteInternalFuture<IgniteTxEx<K, V>> prepFut = this.prepFut.get(); if (prepFut == null || prepFut.isDone()) { try { @@ -846,8 +846,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { } } else { - prepFut.listenAsync(new CI1<IgniteFuture<IgniteTxEx<K, V>>>() { - @Override public void apply(IgniteFuture<IgniteTxEx<K, V>> f) { + prepFut.listenAsync(new CI1<IgniteInternalFuture<IgniteTxEx<K, V>>>() { + @Override public void apply(IgniteInternalFuture<IgniteTxEx<K, V>> f) { try { // Check for errors in prepare future. f.get(); @@ -890,7 +890,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { * @return Future that will be completed when locks are acquired. */ @SuppressWarnings("TypeMayBeWeakened") - public IgniteFuture<IgniteTxEx<K, V>> prepareAsyncLocal(@Nullable Collection<IgniteTxEntry<K, V>> reads, + public IgniteInternalFuture<IgniteTxEx<K, V>> prepareAsyncLocal(@Nullable Collection<IgniteTxEntry<K, V>> reads, @Nullable Collection<IgniteTxEntry<K, V>> writes, Map<UUID, Collection<UUID>> txNodes, boolean last, Collection<UUID> lastBackups) { assert optimistic(); @@ -956,7 +956,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { * * @return Commit future. */ - public IgniteFuture<IgniteTx> commitAsyncLocal() { + public IgniteInternalFuture<IgniteTx> commitAsyncLocal() { if (log.isDebugEnabled()) log.debug("Committing colocated tx locally: " + this); @@ -964,12 +964,12 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { if (pessimistic()) prepareAsync(); - IgniteFuture<IgniteTxEx<K, V>> prep = prepFut.get(); + IgniteInternalFuture<IgniteTxEx<K, V>> prep = prepFut.get(); // Do not create finish future if there are no remote nodes. if (F.isEmpty(dhtMap) && F.isEmpty(nearMap)) { if (prep != null) - return (IgniteFuture<IgniteTx>)(IgniteFuture)prep; + return (IgniteInternalFuture<IgniteTx>)(IgniteInternalFuture)prep; return new GridFinishedFuture<IgniteTx>(cctx.kernalContext(), this); } @@ -1000,8 +1000,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { } } else - prep.listenAsync(new CI1<IgniteFuture<IgniteTxEx<K, V>>>() { - @Override public void apply(IgniteFuture<IgniteTxEx<K, V>> f) { + prep.listenAsync(new CI1<IgniteInternalFuture<IgniteTxEx<K, V>>>() { + @Override public void apply(IgniteInternalFuture<IgniteTxEx<K, V>> f) { try { f.get(); // Check for errors of a parent future. @@ -1029,7 +1029,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { * * @return Commit future. */ - public IgniteFuture<IgniteTx> rollbackAsyncLocal() { + public IgniteInternalFuture<IgniteTx> rollbackAsyncLocal() { if (log.isDebugEnabled()) log.debug("Rolling back colocated tx locally: " + this); @@ -1037,7 +1037,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { cctx.mvcc().addFuture(fut); - IgniteFuture<IgniteTxEx<K, V>> prep = prepFut.get(); + IgniteInternalFuture<IgniteTxEx<K, V>> prep = prepFut.get(); if (prep == null || prep.isDone()) { try { @@ -1053,8 +1053,8 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { fut.finish(); } else - prep.listenAsync(new CI1<IgniteFuture<IgniteTxEx<K, V>>>() { - @Override public void apply(IgniteFuture<IgniteTxEx<K, V>> f) { + prep.listenAsync(new CI1<IgniteInternalFuture<IgniteTxEx<K, V>>>() { + @Override public void apply(IgniteInternalFuture<IgniteTxEx<K, V>> f) { try { f.get(); // Check for errors of a parent future. } @@ -1071,7 +1071,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { } /** {@inheritDoc} */ - public IgniteFuture<GridCacheReturn<V>> lockAllAsync(GridCacheContext<K, V> cacheCtx, + public IgniteInternalFuture<GridCacheReturn<V>> lockAllAsync(GridCacheContext<K, V> cacheCtx, final Collection<? extends K> keys, boolean implicit, boolean read, @@ -1095,7 +1095,7 @@ public class GridNearTxLocal<K, V> extends GridDhtTxLocalAdapter<K, V> { if (log.isDebugEnabled()) log.debug("Before acquiring transaction lock on keys: " + keys); - IgniteFuture<Boolean> fut = cacheCtx.colocated().lockAllAsyncInternal(keys, + IgniteInternalFuture<Boolean> fut = cacheCtx.colocated().lockAllAsyncInternal(keys, lockTimeout(), this, isInvalidate(), http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java index 12aac5e..8df91e0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near; import org.apache.ignite.*; import org.apache.ignite.cluster.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.*; import org.apache.ignite.internal.processors.cache.version.*; @@ -141,8 +142,8 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut */ @Override public Collection<? extends ClusterNode> nodes() { return - F.viewReadOnly(futures(), new IgniteClosure<IgniteFuture<?>, ClusterNode>() { - @Nullable @Override public ClusterNode apply(IgniteFuture<?> f) { + F.viewReadOnly(futures(), new IgniteClosure<IgniteInternalFuture<?>, ClusterNode>() { + @Nullable @Override public ClusterNode apply(IgniteInternalFuture<?> f) { if (isMini(f)) return ((MiniFuture)f).node(); @@ -165,7 +166,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut @Override public boolean onNodeLeft(UUID nodeId) { boolean found = false; - for (IgniteFuture<?> fut : futures()) + for (IgniteInternalFuture<?> fut : futures()) if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -261,7 +262,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut */ public void onResult(UUID nodeId, GridNearTxPrepareResponse<K, V> res) { if (!isDone()) { - for (IgniteFuture<IgniteTxEx<K, V>> fut : pending()) { + for (IgniteInternalFuture<IgniteTxEx<K, V>> fut : pending()) { if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -300,7 +301,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * @param f Future. * @return {@code True} if mini-future. */ - private boolean isMini(IgniteFuture<?> f) { + private boolean isMini(IgniteInternalFuture<?> f) { return f.getClass().equals(MiniFuture.class); } @@ -373,8 +374,8 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut else { topFut.syncNotify(false); - topFut.listenAsync(new CI1<IgniteFuture<Long>>() { - @Override public void apply(IgniteFuture<Long> t) { + topFut.listenAsync(new CI1<IgniteInternalFuture<Long>>() { + @Override public void apply(IgniteInternalFuture<Long> t) { prepare(); } }); @@ -599,7 +600,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut // At this point, if any new node joined, then it is // waiting for this transaction to complete, so // partition reassignments are not possible here. - IgniteFuture<IgniteTxEx<K, V>> fut = cctx.tm().txHandler().prepareTx(n.id(), tx, req); + IgniteInternalFuture<IgniteTxEx<K, V>> fut = cctx.tm().txHandler().prepareTx(n.id(), tx, req); // Add new future. add(new GridEmbeddedFuture<>( http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java index c2cb47b..560f02b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.local; 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.internal.processors.cache.version.*; import org.apache.ignite.lang.*; @@ -95,7 +96,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> txLockAsync(Collection<? extends K> keys, + @Override public IgniteInternalFuture<Boolean> txLockAsync(Collection<? extends K> keys, long timeout, IgniteTxLocalEx<K, V> tx, boolean isRead, @@ -108,7 +109,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, + @Override public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, IgnitePredicate<CacheEntry<K, V>>[] filter) { IgniteTxLocalEx<K, V> tx = ctx.tm().localTx(); @@ -122,7 +123,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { * @param filter Filter. * @return Future. */ - public IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, + public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, @Nullable IgniteTxLocalEx<K, V> tx, IgnitePredicate<CacheEntry<K, V>>[] filter) { if (F.isEmpty(keys)) return new GridFinishedFuture<>(ctx.kernalContext(), true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTx.java index a1ce867..17181d8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTx.java @@ -18,8 +18,8 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; -import org.apache.ignite.lang.*; import org.apache.ignite.transactions.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.apache.ignite.internal.util.future.*; @@ -107,7 +107,7 @@ class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<IgniteTxEx<K, V>> prepareAsync() { + @Override public IgniteInternalFuture<IgniteTxEx<K, V>> prepareAsync() { try { prepare(); @@ -146,7 +146,7 @@ class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings( {"unchecked", "RedundantCast"}) - @Override public IgniteFuture<IgniteTx> commitAsync() { + @Override public IgniteInternalFuture<IgniteTx> commitAsync() { try { prepare(); } @@ -164,11 +164,11 @@ class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { fut.checkLocks(); - return (IgniteFuture)fut; + return (IgniteInternalFuture)fut; } } - return (IgniteFuture)this.fut.get(); + return (IgniteInternalFuture)this.fut.get(); } /** {@inheritDoc} */ @@ -177,7 +177,7 @@ class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<IgniteTx> rollbackAsync() { + @Override public IgniteInternalFuture<IgniteTx> rollbackAsync() { try { state(ROLLING_BACK); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java ---------------------------------------------------------------------- diff --git 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 index 6e72c84..75f8ae8 100644 --- 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 @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.local.atomic; 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.internal.processors.cache.version.*; import org.apache.ignite.internal.util.*; @@ -168,7 +169,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<V> putAsync(K key, + @Override public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl, @@ -187,7 +188,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<Boolean> putxAsync(K key, + @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K, V> entry, long ttl, @@ -211,7 +212,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<V> putIfAbsentAsync(K key, V val) { + @Override public IgniteInternalFuture<V> putIfAbsentAsync(K key, V val) { return putAsync(key, val, ctx.noPeekArray()); } @@ -221,7 +222,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> putxIfAbsentAsync(K key, V val) { + @Override public IgniteInternalFuture<Boolean> putxIfAbsentAsync(K key, V val) { return putxAsync(key, val, ctx.noPeekArray()); } @@ -232,7 +233,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<V> replaceAsync(K key, V val) { + @Override public IgniteInternalFuture<V> replaceAsync(K key, V val) { return putAsync(key, val, ctx.hasPeekArray()); } @@ -242,7 +243,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> replacexAsync(K key, V val) { + @Override public IgniteInternalFuture<Boolean> replacexAsync(K key, V val) { return putxAsync(key, val, ctx.hasPeekArray()); } @@ -254,7 +255,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) { + @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) { return putxAsync(key, newVal, ctx.equalsPeekArray(oldVal)); } @@ -296,7 +297,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<GridCacheReturn<V>> removexAsync(K key, V val) { + @Override public IgniteInternalFuture<GridCacheReturn<V>> removexAsync(K key, V val) { A.notNull(key, "key", val, "val"); ctx.denyOnLocalRead(); @@ -306,7 +307,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) { + @Override public IgniteInternalFuture<GridCacheReturn<V>> replacexAsync(K key, V oldVal, V newVal) { A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal"); ctx.denyOnLocalRead(); @@ -336,7 +337,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> putAllAsync(Map<? extends K, ? extends V> m, + @Override public IgniteInternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m, @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) { ctx.denyOnLocalRead(); @@ -368,7 +369,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<V> removeAsync(K key, + @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K, V> entry, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { ctx.denyOnLocalRead(); @@ -394,7 +395,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> removeAllAsync(Collection<? extends K> keys, + @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys, IgnitePredicate<CacheEntry<K, V>>[] filter) { ctx.denyOnLocalRead(); @@ -432,7 +433,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<Boolean> removexAsync(K key, + @Override public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K, V> entry, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { A.notNull(key, "key"); @@ -460,7 +461,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> removeAsync(K key, V val) { + @Override public IgniteInternalFuture<Boolean> removeAsync(K key, V val) { return removexAsync(key, ctx.equalsPeekArray(val)); } @@ -471,7 +472,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<?> removeAllAsync(IgnitePredicate<CacheEntry<K, V>>[] filter) { + @Override public IgniteInternalFuture<?> removeAllAsync(IgnitePredicate<CacheEntry<K, V>>[] filter) { return removeAllAsync(keySet(filter), filter); } @@ -518,7 +519,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<Map<K, V>> getAllAsync( + @Override public IgniteInternalFuture<Map<K, V>> getAllAsync( @Nullable final Collection<? extends K> keys, final boolean forcePrimary, boolean skipTx, @@ -695,7 +696,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public <T> IgniteFuture<EntryProcessorResult<T>> invokeAsync(K key, + @Override public <T> IgniteInternalFuture<EntryProcessorResult<T>> invokeAsync(K key, EntryProcessor<K, V, T> entryProcessor, Object... args) throws EntryProcessorException { A.notNull(key, "key", entryProcessor, "entryProcessor"); @@ -708,15 +709,15 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { Map<? extends K, EntryProcessor> invokeMap = Collections.singletonMap(key, (EntryProcessor)entryProcessor); - IgniteFuture<Map<K, EntryProcessorResult<T>>> fut = updateAllAsync0(null, + IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> fut = updateAllAsync0(null, invokeMap, args, true, false, null); - return fut.chain(new CX1<IgniteFuture<Map<K, EntryProcessorResult<T>>>, EntryProcessorResult<T>>() { - @Override public EntryProcessorResult<T> applyx(IgniteFuture<Map<K, EntryProcessorResult<T>>> fut) + return fut.chain(new CX1<IgniteInternalFuture<Map<K, EntryProcessorResult<T>>>, EntryProcessorResult<T>>() { + @Override public EntryProcessorResult<T> applyx(IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> fut) throws IgniteCheckedException { Map<K, EntryProcessorResult<T>> resMap = fut.get(); @@ -733,7 +734,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public <T> IgniteFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync( + @Override public <T> IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync( Set<? extends K> keys, final EntryProcessor<K, V, T> entryProcessor, Object... args) { @@ -783,7 +784,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public <T> IgniteFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync( + @Override public <T> IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync( Map<? extends K, ? extends EntryProcessor<K, V, T>> map, Object... args) { A.notNull(map, "map"); @@ -812,7 +813,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { * @param filter Cache entry filter for atomic updates. * @return Completion future. */ - private IgniteFuture updateAllAsync0( + private IgniteInternalFuture updateAllAsync0( @Nullable final Map<? extends K, ? extends V> map, @Nullable final Map<? extends K, ? extends EntryProcessor> invokeMap, @Nullable final Object[] invokeArgs, @@ -855,7 +856,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { * @param filter Cache entry filter. * @return Completion future. */ - private IgniteFuture removeAllAsync0( + private IgniteInternalFuture removeAllAsync0( @Nullable final Collection<? extends K> keys, final boolean retval, final boolean rawRetval, @@ -869,7 +870,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { final ExpiryPolicy expiryPlc = expiryPerCall(); - IgniteFuture fut = asyncOp(new Callable<Object>() { + IgniteInternalFuture fut = asyncOp(new Callable<Object>() { @Override public Object call() throws Exception { return updateAllInternal(DELETE, keys, @@ -1489,7 +1490,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public IgniteFuture<Boolean> txLockAsync(Collection<? extends K> keys, + @Override public IgniteInternalFuture<Boolean> txLockAsync(Collection<? extends K> keys, long timeout, IgniteTxLocalEx<K, V> tx, boolean isRead, @@ -1504,7 +1505,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public IgniteFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, + @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { return new GridFinishedFutureEx<>(new UnsupportedOperationException("Locks are not supported for " + @@ -1538,8 +1539,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { * @return Future. */ @SuppressWarnings("unchecked") - protected IgniteFuture asyncOp(final Callable<?> op) { - IgniteFuture fail = asyncOpAcquire(); + protected IgniteInternalFuture asyncOp(final Callable<?> op) { + IgniteInternalFuture fail = asyncOpAcquire(); if (fail != null) return fail; @@ -1549,12 +1550,12 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { holder.lock(); try { - IgniteFuture fut = holder.future(); + IgniteInternalFuture fut = holder.future(); if (fut != null && !fut.isDone()) { - IgniteFuture f = new GridEmbeddedFuture(fut, - new C2<Object, Exception, IgniteFuture>() { - @Override public IgniteFuture apply(Object t, Exception e) { + IgniteInternalFuture f = new GridEmbeddedFuture(fut, + new C2<Object, Exception, IgniteInternalFuture>() { + @Override public IgniteInternalFuture apply(Object t, Exception e) { return ctx.closures().callLocalSafe(op); } }, ctx.kernalContext()); @@ -1564,7 +1565,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { return f; } - IgniteFuture f = ctx.closures().callLocalSafe(op); + IgniteInternalFuture f = ctx.closures().callLocalSafe(op); saveFuture(holder, f); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java index 7b8013e..4f668e6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java @@ -18,8 +18,8 @@ package org.apache.ignite.internal.processors.cache.query; import org.apache.ignite.cluster.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; -import org.apache.ignite.lang.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.util.future.*; import org.jetbrains.annotations.*; @@ -94,7 +94,7 @@ public class GridCacheDistributedFieldsQueryFuture } /** {@inheritDoc} */ - @Override public IgniteFuture<List<GridQueryFieldMetadata>> metadata() { + @Override public IgniteInternalFuture<List<GridQueryFieldMetadata>> metadata() { return metaFut; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java index 5be7d9f..cb7e9eb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java @@ -22,6 +22,7 @@ import org.apache.ignite.cache.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.cluster.*; import org.apache.ignite.events.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.lang.*; import org.apache.ignite.internal.managers.eventstorage.*; @@ -521,8 +522,8 @@ public class GridCacheDistributedQueryManager<K, V> extends GridCacheQueryManage cctx.io().addOrderedHandler(topic, resHnd); - fut.listenAsync(new CI1<IgniteFuture<?>>() { - @Override public void apply(IgniteFuture<?> fut) { + fut.listenAsync(new CI1<IgniteInternalFuture<?>>() { + @Override public void apply(IgniteInternalFuture<?> fut) { cctx.io().removeOrderedHandler(topic); } }); @@ -630,8 +631,8 @@ public class GridCacheDistributedQueryManager<K, V> extends GridCacheQueryManage cctx.io().addOrderedHandler(topic, resHnd); - fut.listenAsync(new CI1<IgniteFuture<?>>() { - @Override public void apply(IgniteFuture<?> fut) { + fut.listenAsync(new CI1<IgniteInternalFuture<?>>() { + @Override public void apply(IgniteInternalFuture<?> fut) { cctx.io().removeOrderedHandler(topic); } }); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java index 99536b7..93a8fd9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache.query; import org.apache.ignite.internal.*; -import org.apache.ignite.lang.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.util.future.*; @@ -48,7 +47,7 @@ public class GridCacheFieldsQueryErrorFuture extends GridCacheQueryErrorFuture<L /** * @return Metadata. */ - public IgniteFuture<List<GridQueryFieldMetadata>> metadata() { + public IgniteInternalFuture<List<GridQueryFieldMetadata>> metadata() { return new GridFinishedFuture<>(ctx, incMeta ? Collections.<GridQueryFieldMetadata>emptyList() : null); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java index 253afc2..782d9da 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java @@ -17,8 +17,8 @@ package org.apache.ignite.internal.processors.cache.query; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; -import org.apache.ignite.lang.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.util.future.*; import org.jetbrains.annotations.*; @@ -74,7 +74,7 @@ public class GridCacheLocalFieldsQueryFuture } /** {@inheritDoc} */ - @Override public IgniteFuture<List<GridQueryFieldMetadata>> metadata() { + @Override public IgniteInternalFuture<List<GridQueryFieldMetadata>> metadata() { return metaFut; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryFuture.java index e5ac5f7..7f0c8e4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryFuture.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.query; 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.marshaller.*; @@ -39,7 +40,7 @@ public class GridCacheLocalQueryFuture<K, V, R> extends GridCacheQueryFutureAdap private Runnable run; /** */ - private IgniteFuture<?> fut; + private IgniteInternalFuture<?> fut; /** * Required by {@link Externalizable}. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java index 2869878..4f39316 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache.query; import org.apache.ignite.*; import org.apache.ignite.cache.query.*; -import org.apache.ignite.lang.*; +import org.apache.ignite.internal.*; import java.util.*; @@ -56,7 +56,7 @@ public interface GridCacheQueriesEx<K, V> extends CacheQueries<K, V> { * @param qry Query. * @return Future. */ - public IgniteFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry); + public IgniteInternalFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry); /** * @param space Space. @@ -64,5 +64,5 @@ public interface GridCacheQueriesEx<K, V> extends CacheQueries<K, V> { * @param params Parameters. * @return Result. */ - public IgniteFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object... params); + public IgniteInternalFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object... params); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java index d8edfc1..1d215b2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java @@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.query; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.cache.query.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; import org.apache.ignite.spi.indexing.*; @@ -166,7 +167,7 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Ext } /** {@inheritDoc} */ - @Override public IgniteFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry) { + @Override public IgniteInternalFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry) { return ctx.kernalContext().query().queryTwoStep(space, qry); } @@ -176,7 +177,7 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Ext * @param params Parameters. * @return Result. */ - public IgniteFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object[] params) { + public IgniteInternalFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object[] params) { return ctx.kernalContext().query().queryTwoStep(space, sqlQry, params); } @@ -186,21 +187,21 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Ext } /** {@inheritDoc} */ - @Override public IgniteFuture<?> rebuildIndexes(Class<?> cls) { + @Override public IgniteInternalFuture<?> rebuildIndexes(Class<?> cls) { A.notNull(cls, "cls"); return ctx.queries().rebuildIndexes(cls); } /** {@inheritDoc} */ - @Override public IgniteFuture<?> rebuildIndexes(String typeName) { + @Override public IgniteInternalFuture<?> rebuildIndexes(String typeName) { A.notNull("typeName", typeName); return ctx.queries().rebuildIndexes(typeName); } /** {@inheritDoc} */ - @Override public IgniteFuture<?> rebuildAllIndexes() { + @Override public IgniteInternalFuture<?> rebuildAllIndexes() { return ctx.queries().rebuildAllIndexes(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5bef132/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java index 068fa14..0266629 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java @@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.query; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.cache.query.*; +import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*; @@ -174,7 +175,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public IgniteFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry) { + @Override public IgniteInternalFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry) { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { @@ -186,7 +187,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public IgniteFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object[] params) { + @Override public IgniteInternalFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object[] params) { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { @@ -198,7 +199,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public IgniteFuture<?> rebuildIndexes(Class<?> cls) { + @Override public IgniteInternalFuture<?> rebuildIndexes(Class<?> cls) { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { @@ -210,7 +211,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public IgniteFuture<?> rebuildIndexes(String typeName) { + @Override public IgniteInternalFuture<?> rebuildIndexes(String typeName) { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { @@ -222,7 +223,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public IgniteFuture<?> rebuildAllIndexes() { + @Override public IgniteInternalFuture<?> rebuildAllIndexes() { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try {