http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 ad7041d..d899562 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 @@ -58,7 +58,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { new AtomicReference<>(); /** DHT mappings. */ - private ConcurrentMap<UUID, GridDistributedTxMapping<K, V>> mappings = + private ConcurrentMap<UUID, GridDistributedTxMapping> mappings = new ConcurrentHashMap8<>(); /** Future. */ @@ -66,11 +66,11 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { new AtomicReference<>(); /** */ - private final AtomicReference<GridNearTxFinishFuture<K, V>> commitFut = + private final AtomicReference<GridNearTxFinishFuture> commitFut = new AtomicReference<>(); /** */ - private final AtomicReference<GridNearTxFinishFuture<K, V>> rollbackFut = + private final AtomicReference<GridNearTxFinishFuture> rollbackFut = new AtomicReference<>(); /** Entries to lock on next step of prepare stage. */ @@ -83,7 +83,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { private boolean colocatedLocallyMapped; /** Info for entries accessed locally in optimistic transaction. */ - private Map<IgniteTxKey<K>, IgniteCacheExpiryPolicy> accessMap; + private Map<IgniteTxKey, IgniteCacheExpiryPolicy> accessMap; /** * Empty constructor required for {@link Externalizable}. @@ -109,7 +109,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { * @param taskNameHash Task name hash code. */ public GridNearTxLocal( - GridCacheSharedContext<K, V> ctx, + GridCacheSharedContext ctx, boolean implicit, boolean implicitSingle, boolean sys, @@ -182,7 +182,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { } /** {@inheritDoc} */ - @Override protected IgniteInternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K, V> cached, + @Override protected IgniteInternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry cached, IgniteTxEntry entry, long topVer) { // We are in near transaction, do not add local node as reader. return null; @@ -194,7 +194,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { } /** {@inheritDoc} */ - @Override protected void clearPrepareFuture(GridDhtTxPrepareFuture<K, V> fut) { + @Override protected void clearPrepareFuture(GridDhtTxPrepareFuture fut) { prepFut.compareAndSet(fut, null); } @@ -280,75 +280,77 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> loadMissing( - GridCacheContext<K, V> cacheCtx, + GridCacheContext cacheCtx, boolean readThrough, boolean async, - final Collection<? extends K> keys, + final Collection<KeyCacheObject> keys, boolean deserializePortable, boolean skipVals, - final IgniteBiInClosure<K, V> c + final IgniteBiInClosure<KeyCacheObject, Object> c ) { - if (cacheCtx.isNear()) { - return cacheCtx.nearTx().txLoadAsync(this, - keys, - readThrough, - deserializePortable, - accessPolicy(cacheCtx, keys), - skipVals).chain(new C1<IgniteInternalFuture<Map<K, V>>, Boolean>() { - @Override public Boolean apply(IgniteInternalFuture<Map<K, V>> f) { - try { - Map<K, V> map = f.get(); - - // Must loop through keys, not map entries, - // as map entries may not have all the keys. - for (K key : keys) - c.apply(key, map.get(key)); - - return true; - } - catch (Exception e) { - setRollbackOnly(); - - throw new GridClosureException(e); - } - } - }); - } - else if (cacheCtx.isColocated()) { - return cacheCtx.colocated().loadAsync(keys, - readThrough, - /*reload*/false, - /*force primary*/false, - topologyVersion(), - CU.subjectId(this, cctx), - resolveTaskName(), - deserializePortable, - accessPolicy(cacheCtx, keys), - skipVals).chain(new C1<IgniteInternalFuture<Map<K, V>>, Boolean>() { - @Override public Boolean apply(IgniteInternalFuture<Map<K, V>> f) { - try { - Map<K, V> map = f.get(); - - // Must loop through keys, not map entries, - // as map entries may not have all the keys. - for (K key : keys) - c.apply(key, map.get(key)); - - return true; - } - catch (Exception e) { - setRollbackOnly(); - - throw new GridClosureException(e); - } - } - }); - } - else { - assert cacheCtx.isLocal(); - - return super.loadMissing(cacheCtx, readThrough, async, keys, deserializePortable, skipVals, c); - } + return null; +// TODO IGNITE-51. +// if (cacheCtx.isNear()) { +// return cacheCtx.nearTx().txLoadAsync(this, +// keys, +// readThrough, +// deserializePortable, +// accessPolicy(cacheCtx, keys), +// skipVals).chain(new C1<IgniteInternalFuture<Map<K, V>>, Boolean>() { +// @Override public Boolean apply(IgniteInternalFuture<Map<K, V>> f) { +// try { +// Map<K, V> map = f.get(); +// +// // Must loop through keys, not map entries, +// // as map entries may not have all the keys. +// for (K key : keys) +// c.apply(key, map.get(key)); +// +// return true; +// } +// catch (Exception e) { +// setRollbackOnly(); +// +// throw new GridClosureException(e); +// } +// } +// }); +// } +// else if (cacheCtx.isColocated()) { +// return cacheCtx.colocated().loadAsync(keys, +// readThrough, +// /*reload*/false, +// /*force primary*/false, +// topologyVersion(), +// CU.subjectId(this, cctx), +// resolveTaskName(), +// deserializePortable, +// accessPolicy(cacheCtx, keys), +// skipVals).chain(new C1<IgniteInternalFuture<Map<K, V>>, Boolean>() { +// @Override public Boolean apply(IgniteInternalFuture<Map<K, V>> f) { +// try { +// Map<K, V> map = f.get(); +// +// // Must loop through keys, not map entries, +// // as map entries may not have all the keys. +// for (K key : keys) +// c.apply(key, map.get(key)); +// +// return true; +// } +// catch (Exception e) { +// setRollbackOnly(); +// +// throw new GridClosureException(e); +// } +// } +// }); +// } +// else { +// assert cacheCtx.isLocal(); +// +// return super.loadMissing(cacheCtx, readThrough, async, keys, deserializePortable, skipVals, c); +// } } /** {@inheritDoc} */ @@ -373,7 +375,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { /** * @return DHT map. */ - ConcurrentMap<UUID, GridDistributedTxMapping<K, V>> mappings() { + ConcurrentMap<UUID, GridDistributedTxMapping> mappings() { return mappings; } @@ -385,7 +387,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { // This step is very important as near and DHT versions grow separately. cctx.versions().onReceived(nodeId, dhtVer); - GridDistributedTxMapping<K, V> m = mappings.get(nodeId); + GridDistributedTxMapping m = mappings.get(nodeId); if (m != null) m.dhtVersion(dhtVer); @@ -410,7 +412,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { } /** {@inheritDoc} */ - @Override protected void addGroupTxMapping(Collection<IgniteTxKey<K>> keys) { + @Override protected void addGroupTxMapping(Collection<IgniteTxKey> keys) { super.addGroupTxMapping(keys); addKeyMapping(cctx.localNode(), keys); @@ -422,11 +424,11 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { * @param key Key to add. * @param node Node this key mapped to. */ - public void addKeyMapping(IgniteTxKey<K> key, ClusterNode node) { - GridDistributedTxMapping<K, V> m = mappings.get(node.id()); + public void addKeyMapping(IgniteTxKey key, ClusterNode node) { + GridDistributedTxMapping m = mappings.get(node.id()); if (m == null) - mappings.put(node.id(), m = new GridDistributedTxMapping<>(node)); + mappings.put(node.id(), m = new GridDistributedTxMapping(node)); IgniteTxEntry txEntry = txMap.get(key); @@ -447,13 +449,13 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { * @param n Mapped node. * @param mappedKeys Mapped keys. */ - private void addKeyMapping(ClusterNode n, Iterable<IgniteTxKey<K>> mappedKeys) { - GridDistributedTxMapping<K, V> m = mappings.get(n.id()); + private void addKeyMapping(ClusterNode n, Iterable<IgniteTxKey> mappedKeys) { + GridDistributedTxMapping m = mappings.get(n.id()); if (m == null) - mappings.put(n.id(), m = new GridDistributedTxMapping<>(n)); + mappings.put(n.id(), m = new GridDistributedTxMapping(n)); - for (IgniteTxKey<K> key : mappedKeys) { + for (IgniteTxKey key : mappedKeys) { IgniteTxEntry txEntry = txMap.get(key); assert txEntry != null; @@ -467,15 +469,15 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { /** * @param maps Mappings. */ - void addEntryMapping(@Nullable Collection<GridDistributedTxMapping<K, V>> maps) { + void addEntryMapping(@Nullable Collection<GridDistributedTxMapping> maps) { if (!F.isEmpty(maps)) { - for (GridDistributedTxMapping<K, V> map : maps) { + for (GridDistributedTxMapping map : maps) { ClusterNode n = map.node(); - GridDistributedTxMapping<K, V> m = mappings.get(n.id()); + GridDistributedTxMapping m = mappings.get(n.id()); if (m == null) - m = F.addIfAbsent(mappings, n.id(), new GridDistributedTxMapping<K, V>(n)); + m = F.addIfAbsent(mappings, n.id(), new GridDistributedTxMapping(n)); assert m != null; @@ -496,17 +498,17 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { * @param failedNodeId Failed node ID. * @param mapQueue Mappings queue. */ - void removeKeysMapping(UUID failedNodeId, Iterable<GridDistributedTxMapping<K, V>> mapQueue) { + void removeKeysMapping(UUID failedNodeId, Iterable<GridDistributedTxMapping> mapQueue) { assert failedNodeId != null; assert mapQueue != null; mappings.remove(failedNodeId); if (!F.isEmpty(mapQueue)) { - for (GridDistributedTxMapping<K, V> m : mapQueue) { + for (GridDistributedTxMapping m : mapQueue) { UUID nodeId = m.node().id(); - GridDistributedTxMapping<K, V> mapping = mappings.get(nodeId); + GridDistributedTxMapping mapping = mappings.get(nodeId); if (mapping != null) { for (IgniteTxEntry entry : m.entries()) @@ -524,7 +526,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { * @return {@code True} if mapping was found. */ public boolean markExplicit(UUID nodeId) { - GridDistributedTxMapping<K, V> m = mappings.get(nodeId); + GridDistributedTxMapping m = mappings.get(nodeId); if (m != null) { m.markExplicitLock(); @@ -537,8 +539,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { /** {@inheritDoc} */ @Override public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner) { - GridCacheMvccFuture<K, V, IgniteInternalTx> fut = (GridCacheMvccFuture<K, V, IgniteInternalTx>)prepFut - .get(); + GridCacheMvccFuture<IgniteInternalTx> fut = (GridCacheMvccFuture<IgniteInternalTx>)prepFut.get(); return fut != null && fut.onOwnerChanged(entry, owner); } @@ -549,7 +550,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { * @param committedVers Committed versions. * @param rolledbackVers Rolled back versions. */ - void readyNearLocks(GridDistributedTxMapping<K, V> mapping, + void readyNearLocks(GridDistributedTxMapping mapping, Collection<GridCacheVersion> pendingVers, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers) @@ -560,11 +561,11 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { for (IgniteTxEntry txEntry : entries) { while (true) { - GridCacheContext<K, V> cacheCtx = txEntry.cached().context(); + GridCacheContext cacheCtx = txEntry.cached().context(); assert cacheCtx.isNear(); - GridDistributedCacheEntry<K, V> entry = (GridDistributedCacheEntry<K, V>)txEntry.cached(); + GridDistributedCacheEntry entry = (GridDistributedCacheEntry)txEntry.cached(); try { // Handle explicit locks. @@ -691,7 +692,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { /** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> prepareAsync() { - GridNearTxPrepareFuture<K, V> fut = (GridNearTxPrepareFuture<K, V>)prepFut.get(); + GridNearTxPrepareFuture fut = (GridNearTxPrepareFuture)prepFut.get(); if (fut == null) { // Future must be created before any exception can be thrown. @@ -753,7 +754,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { prepareAsync(); - GridNearTxFinishFuture<K, V> fut = commitFut.get(); + GridNearTxFinishFuture fut = commitFut.get(); if (fut == null && !commitFut.compareAndSet(null, fut = new GridNearTxFinishFuture<>(cctx, this, true))) return commitFut.get(); @@ -764,7 +765,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { prepareFut.listenAsync(new CI1<IgniteInternalFuture<IgniteInternalTx>>() { @Override public void apply(IgniteInternalFuture<IgniteInternalTx> f) { - GridNearTxFinishFuture<K, V> fut0 = commitFut.get(); + GridNearTxFinishFuture fut0 = commitFut.get(); try { // Make sure that here are no exceptions. @@ -797,7 +798,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { if (log.isDebugEnabled()) log.debug("Rolling back near tx: " + this); - GridNearTxFinishFuture<K, V> fut = rollbackFut.get(); + GridNearTxFinishFuture fut = rollbackFut.get(); if (fut != null) return fut; @@ -842,7 +843,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { log.debug("Got optimistic tx failure [tx=" + this + ", err=" + e + ']'); } - GridNearTxFinishFuture<K, V> fut0 = rollbackFut.get(); + GridNearTxFinishFuture fut0 = rollbackFut.get(); try { if (finish(false) || state() == UNKNOWN) @@ -895,11 +896,11 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { init(); - GridDhtTxPrepareFuture<K, V> fut = new GridDhtTxPrepareFuture<>( + GridDhtTxPrepareFuture fut = new GridDhtTxPrepareFuture<>( cctx, this, IgniteUuid.randomUuid(), - Collections.<IgniteTxKey<K>, GridCacheVersion>emptyMap(), + Collections.<IgniteTxKey, GridCacheVersion>emptyMap(), last, needReturnValue() && implicit(), lastBackups, @@ -968,7 +969,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { return new GridFinishedFuture<IgniteInternalTx>(cctx.kernalContext(), this); } - final GridDhtTxFinishFuture<K, V> fut = new GridDhtTxFinishFuture<>(cctx, this, /*commit*/true); + final GridDhtTxFinishFuture fut = new GridDhtTxFinishFuture<>(cctx, this, /*commit*/true); cctx.mvcc().addFuture(fut); @@ -1027,7 +1028,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { if (log.isDebugEnabled()) log.debug("Rolling back colocated tx locally: " + this); - final GridDhtTxFinishFuture<K, V> fut = new GridDhtTxFinishFuture<>(cctx, this, /*commit*/false); + final GridDhtTxFinishFuture fut = new GridDhtTxFinishFuture<>(cctx, this, /*commit*/false); cctx.mvcc().addFuture(fut); @@ -1065,7 +1066,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { } /** {@inheritDoc} */ - public IgniteInternalFuture<GridCacheReturn<V>> lockAllAsync(GridCacheContext<K, V> cacheCtx, + public <K> IgniteInternalFuture<GridCacheReturn<Object>> lockAllAsync(GridCacheContext cacheCtx, final Collection<? extends K> keys, boolean implicit, boolean read, @@ -1079,7 +1080,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { return new GridFinishedFuture<>(cctx.kernalContext(), e); } - final GridCacheReturn<V> ret = new GridCacheReturn<>(false); + final GridCacheReturn<Object> ret = new GridCacheReturn<>(false); if (F.isEmpty(keys)) return new GridFinishedFuture<>(cctx.kernalContext(), ret); @@ -1097,12 +1098,12 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { /*retval*/false, isolation, accessTtl, - CU.<K, V>empty()); + CU.empty()); return new GridEmbeddedFuture<>( fut, - new PLC1<GridCacheReturn<V>>(ret, false) { - @Override protected GridCacheReturn<V> postLock(GridCacheReturn<V> ret) { + new PLC1<GridCacheReturn<Object>>(ret, false) { + @Override protected GridCacheReturn<Object> postLock(GridCacheReturn<Object> ret) { if (log.isDebugEnabled()) log.debug("Acquired transaction lock on keys: " + keys); @@ -1113,7 +1114,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { } /** {@inheritDoc} */ - @Override protected GridCacheEntryEx entryEx(GridCacheContext<K, V> cacheCtx, IgniteTxKey<K> key) { + @Override protected GridCacheEntryEx entryEx(GridCacheContext cacheCtx, IgniteTxKey key) { if (cacheCtx.isColocated()) { IgniteTxEntry txEntry = entry(key); @@ -1130,7 +1131,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { if (cached.obsoleteVersion() != null) { cached = cacheCtx.colocated().entryExx(key.key(), topologyVersion(), true); - txEntry.cached(cached, txEntry.keyBytes()); + txEntry.cached(cached, null); } return cached; @@ -1140,7 +1141,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { } /** {@inheritDoc} */ - @Override protected GridCacheEntryEx entryEx(GridCacheContext<K, V> cacheCtx, IgniteTxKey<K> key, long topVer) { + @Override protected GridCacheEntryEx entryEx(GridCacheContext cacheCtx, IgniteTxKey key, long topVer) { if (cacheCtx.isColocated()) { IgniteTxEntry txEntry = entry(key); @@ -1157,7 +1158,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { if (cached.obsoleteVersion() != null) { cached = cacheCtx.colocated().entryExx(key.key(), topVer, true); - txEntry.cached(cached, txEntry.keyBytes()); + txEntry.cached(cached, null); } return cached; @@ -1169,7 +1170,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { /** {@inheritDoc} */ @Override protected IgniteCacheExpiryPolicy accessPolicy( GridCacheContext ctx, - IgniteTxKey<K> key, + IgniteTxKey key, @Nullable ExpiryPolicy expiryPlc ) { assert optimistic(); @@ -1191,9 +1192,9 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { * @param keys Keys. * @return Expiry policy. */ - private IgniteCacheExpiryPolicy accessPolicy(GridCacheContext<K, V> cacheCtx, Collection<? extends K> keys) { + private IgniteCacheExpiryPolicy accessPolicy(GridCacheContext cacheCtx, Collection<KeyCacheObject> keys) { if (accessMap != null) { - for (Map.Entry<IgniteTxKey<K>, IgniteCacheExpiryPolicy> e : accessMap.entrySet()) { + for (Map.Entry<IgniteTxKey, IgniteCacheExpiryPolicy> e : accessMap.entrySet()) { if (e.getKey().cacheId() == cacheCtx.cacheId() && keys.contains(e.getKey().key())) return e.getValue(); } @@ -1209,7 +1210,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter { if (accessMap != null) { assert optimistic(); - for (Map.Entry<IgniteTxKey<K>, IgniteCacheExpiryPolicy> e : accessMap.entrySet()) { + for (Map.Entry<IgniteTxKey, IgniteCacheExpiryPolicy> e : accessMap.entrySet()) { if (e.getValue().entries() != null) { GridCacheContext cctx0 = cctx.cacheContext(e.getKey().cacheId());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 eeb1c15..f6fede2 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 @@ -52,7 +52,7 @@ import static org.apache.ignite.transactions.TransactionState.*; * */ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFuture<IgniteInternalTx> - implements GridCacheMvccFuture<K, V, IgniteInternalTx> { + implements GridCacheMvccFuture<IgniteInternalTx> { /** */ private static final long serialVersionUID = 0L; @@ -67,7 +67,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut /** Transaction. */ @GridToStringExclude - private GridNearTxLocal<K, V> tx; + private GridNearTxLocal tx; /** Logger. */ private IgniteLogger log; @@ -83,7 +83,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut private GridDhtTxMapping<K, V> txMapping; /** */ - private Collection<IgniteTxKey<K>> lockKeys = new GridConcurrentHashSet<>(); + private Collection<IgniteTxKey> lockKeys = new GridConcurrentHashSet<>(); /** * Empty constructor required for {@link Externalizable}. @@ -96,7 +96,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * @param cctx Context. * @param tx Transaction. */ - public GridNearTxPrepareFuture(GridCacheSharedContext<K, V> cctx, final GridNearTxLocal<K, V> tx) { + public GridNearTxPrepareFuture(GridCacheSharedContext<K, V> cctx, final GridNearTxLocal tx) { super(cctx.kernalContext(), new IgniteReducer<IgniteInternalTx, IgniteInternalTx>() { @Override public boolean collect(IgniteInternalTx e) { return true; @@ -196,7 +196,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * @param mappings Remaining mappings. * @param e Error. */ - void onError(@Nullable UUID nodeId, @Nullable Iterable<GridDistributedTxMapping<K, V>> mappings, Throwable e) { + void onError(@Nullable UUID nodeId, @Nullable Iterable<GridDistributedTxMapping> mappings, Throwable e) { if (err.compareAndSet(null, e)) { boolean marked = tx.setRollbackOnly(); @@ -249,7 +249,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * @param nodeId Sender. * @param res Result. */ - public void onResult(UUID nodeId, GridNearTxPrepareResponse<K, V> res) { + public void onResult(UUID nodeId, GridNearTxPrepareResponse res) { if (!isDone()) { for (IgniteInternalFuture<IgniteInternalTx> fut : pending()) { if (isMini(fut)) { @@ -469,7 +469,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut txMapping = new GridDhtTxMapping<>(); - ConcurrentLinkedDeque8<GridDistributedTxMapping<K, V>> mappings = + ConcurrentLinkedDeque8<GridDistributedTxMapping> mappings = new ConcurrentLinkedDeque8<>(); if (!F.isEmpty(reads) || !F.isEmpty(writes)) { @@ -486,10 +486,10 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut } // Assign keys to primary nodes. - GridDistributedTxMapping<K, V> cur = null; + GridDistributedTxMapping cur = null; for (IgniteTxEntry read : reads) { - GridDistributedTxMapping<K, V> updated = map(read, topVer, cur, false); + GridDistributedTxMapping updated = map(read, topVer, cur, false); if (cur != updated) { mappings.offer(updated); @@ -506,7 +506,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut } for (IgniteTxEntry write : writes) { - GridDistributedTxMapping<K, V> updated = map(write, topVer, cur, true); + GridDistributedTxMapping updated = map(write, topVer, cur, true); if (cur != updated) { mappings.offer(updated); @@ -546,14 +546,14 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * */ private void preparePessimistic() { - Map<IgniteBiTuple<ClusterNode, Boolean>, GridDistributedTxMapping<K, V>> mappings = new HashMap<>(); + Map<IgniteBiTuple<ClusterNode, Boolean>, GridDistributedTxMapping> mappings = new HashMap<>(); long topVer = tx.topologyVersion(); txMapping = new GridDhtTxMapping<>(); for (IgniteTxEntry txEntry : tx.allEntries()) { - GridCacheContext<K, V> cacheCtx = txEntry.context(); + GridCacheContext cacheCtx = txEntry.context(); List<ClusterNode> nodes = cacheCtx.affinity().nodes(txEntry.key(), topVer); @@ -563,10 +563,10 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut IgniteBiTuple<ClusterNode, Boolean> key = F.t(primary, near); - GridDistributedTxMapping<K, V> nodeMapping = mappings.get(key); + GridDistributedTxMapping nodeMapping = mappings.get(key); if (nodeMapping == null) { - nodeMapping = new GridDistributedTxMapping<>(primary); + nodeMapping = new GridDistributedTxMapping(primary); nodeMapping.near(cacheCtx.isNear()); @@ -584,10 +584,10 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut checkOnePhase(); - for (final GridDistributedTxMapping<K, V> m : mappings.values()) { + for (final GridDistributedTxMapping m : mappings.values()) { final ClusterNode node = m.node(); - GridNearTxPrepareRequest<K, V> req = new GridNearTxPrepareRequest<>( + GridNearTxPrepareRequest req = new GridNearTxPrepareRequest( futId, tx.topologyVersion(), tx, @@ -617,8 +617,8 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut add(fut); if (node.isLocal()) { - cctx.tm().txHandler().prepareTx(node.id(), tx, req, new CI1<GridNearTxPrepareResponse<K, V>>() { - @Override public void apply(GridNearTxPrepareResponse<K, V> res) { + cctx.tm().txHandler().prepareTx(node.id(), tx, req, new CI1<GridNearTxPrepareResponse>() { + @Override public void apply(GridNearTxPrepareResponse res) { fut.onResult(node.id(), res); } }); @@ -664,11 +664,11 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * * @param mappings Queue of mappings. */ - private void proceedPrepare(final ConcurrentLinkedDeque8<GridDistributedTxMapping<K, V>> mappings) { + private void proceedPrepare(final ConcurrentLinkedDeque8<GridDistributedTxMapping> mappings) { if (isDone()) return; - final GridDistributedTxMapping<K, V> m = mappings.poll(); + final GridDistributedTxMapping m = mappings.poll(); if (m == null) return; @@ -677,7 +677,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut final ClusterNode n = m.node(); - GridNearTxPrepareRequest<K, V> req = new GridNearTxPrepareRequest<>( + GridNearTxPrepareRequest req = new GridNearTxPrepareRequest( futId, tx.topologyVersion(), tx, @@ -723,8 +723,8 @@ 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. - cctx.tm().txHandler().prepareTx(n.id(), tx, req, new CI1<GridNearTxPrepareResponse<K, V>>() { - @Override public void apply(GridNearTxPrepareResponse<K, V> res) { + cctx.tm().txHandler().prepareTx(n.id(), tx, req, new CI1<GridNearTxPrepareResponse>() { + @Override public void apply(GridNearTxPrepareResponse res) { fut.onResult(n.id(), res); } }); @@ -750,13 +750,13 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * @throws IgniteCheckedException If transaction is group-lock and local node is not primary for key. * @return Mapping. */ - private GridDistributedTxMapping<K, V> map( + private GridDistributedTxMapping map( IgniteTxEntry entry, long topVer, - GridDistributedTxMapping<K, V> cur, + GridDistributedTxMapping cur, boolean waitLock ) throws IgniteCheckedException { - GridCacheContext<K, V> cacheCtx = entry.context(); + GridCacheContext cacheCtx = entry.context(); List<ClusterNode> nodes = cacheCtx.affinity().nodes(entry.key(), topVer); @@ -778,11 +778,11 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut // Must re-initialize cached entry while holding topology lock. if (cacheCtx.isNear()) - entry.cached(cacheCtx.nearTx().entryExx(entry.key(), topVer), entry.keyBytes()); + entry.cached(cacheCtx.nearTx().entryExx(entry.key(), topVer), null); else if (!cacheCtx.isLocal()) - entry.cached(cacheCtx.colocated().entryExx(entry.key(), topVer, true), entry.keyBytes()); + entry.cached(cacheCtx.colocated().entryExx(entry.key(), topVer, true), null); else - entry.cached(cacheCtx.local().entryEx(entry.key(), topVer), entry.keyBytes()); + entry.cached(cacheCtx.local().entryEx(entry.key(), topVer), null); if (cacheCtx.isNear() || cacheCtx.isLocal()) { if (waitLock && entry.explicitVersion() == null) { @@ -792,7 +792,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut } if (cur == null || !cur.node().id().equals(primary.id()) || cur.near() != cacheCtx.isNear()) { - cur = new GridDistributedTxMapping<>(primary); + cur = new GridDistributedTxMapping(primary); // Initialize near flag right away. cur.near(cacheCtx.isNear()); @@ -805,14 +805,14 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut if (cacheCtx.isNear()) { while (true) { try { - GridNearCacheEntry<K, V> cached = (GridNearCacheEntry<K, V>)entry.cached(); + GridNearCacheEntry cached = (GridNearCacheEntry)entry.cached(); cached.dhtNodeId(tx.xidVersion(), primary.id()); break; } catch (GridCacheEntryRemovedException ignore) { - entry.cached(cacheCtx.near().entryEx(entry.key()), entry.keyBytes()); + entry.cached(cacheCtx.near().entryEx(entry.key()), null); } } } @@ -838,13 +838,13 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut /** Keys. */ @GridToStringInclude - private GridDistributedTxMapping<K, V> m; + private GridDistributedTxMapping m; /** Flag to signal some result being processed. */ private AtomicBoolean rcvRes = new AtomicBoolean(false); /** Mappings to proceed prepare. */ - private ConcurrentLinkedDeque8<GridDistributedTxMapping<K, V>> mappings; + private ConcurrentLinkedDeque8<GridDistributedTxMapping> mappings; /** * Empty constructor required for {@link Externalizable}. @@ -857,8 +857,8 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * @param m Mapping. * @param mappings Queue of mappings to proceed with. */ - MiniFuture(GridDistributedTxMapping<K, V> m, - ConcurrentLinkedDeque8<GridDistributedTxMapping<K, V>> mappings) { + MiniFuture(GridDistributedTxMapping m, + ConcurrentLinkedDeque8<GridDistributedTxMapping> mappings) { super(cctx.kernalContext()); this.m = m; @@ -882,7 +882,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut /** * @return Keys. */ - public GridDistributedTxMapping<K, V> mapping() { + public GridDistributedTxMapping mapping() { return m; } @@ -923,7 +923,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut * @param nodeId Failed node ID. * @param res Result callback. */ - void onResult(UUID nodeId, GridNearTxPrepareResponse<K, V> res) { + void onResult(UUID nodeId, GridNearTxPrepareResponse res) { if (isDone()) return; @@ -935,27 +935,27 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut else { assert F.isEmpty(res.invalidPartitions()); - for (Map.Entry<IgniteTxKey<K>, GridTuple3<GridCacheVersion, V, byte[]>> entry : res.ownedValues().entrySet()) { + for (Map.Entry<IgniteTxKey, GridTuple3<GridCacheVersion, CacheObject, byte[]>> entry : res.ownedValues().entrySet()) { IgniteTxEntry txEntry = tx.entry(entry.getKey()); assert txEntry != null; - GridCacheContext<K, V> cacheCtx = txEntry.context(); + GridCacheContext cacheCtx = txEntry.context(); while (true) { try { if (cacheCtx.isNear()) { - GridNearCacheEntry<K, V> nearEntry = (GridNearCacheEntry<K, V>)txEntry.cached(); + GridNearCacheEntry nearEntry = (GridNearCacheEntry)txEntry.cached(); - GridTuple3<GridCacheVersion, V, byte[]> tup = entry.getValue(); + GridTuple3<GridCacheVersion, CacheObject, byte[]> tup = entry.getValue(); nearEntry.resetFromPrimary(tup.get2(), tup.get3(), tx.xidVersion(), tup.get1(), m.node().id()); } else if (txEntry.cached().detached()) { - GridDhtDetachedCacheEntry<K, V> detachedEntry = (GridDhtDetachedCacheEntry<K, V>)txEntry.cached(); + GridDhtDetachedCacheEntry detachedEntry = (GridDhtDetachedCacheEntry)txEntry.cached(); - GridTuple3<GridCacheVersion, V, byte[]> tup = entry.getValue(); + GridTuple3<GridCacheVersion, CacheObject, byte[]> tup = entry.getValue(); detachedEntry.resetFromPrimary(tup.get2(), tup.get3(), tx.xidVersion()); } @@ -976,7 +976,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut tx.implicitSingleResult(res.returnValue()); - for (IgniteTxKey<K> key : res.filterFailedKeys()) { + for (IgniteTxKey key : res.filterFailedKeys()) { IgniteTxEntry txEntry = tx.entry(key); assert txEntry != null : "Missing tx entry for write key: " + key; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java index 7d4f09d9..b698ff2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java @@ -141,7 +141,7 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter { * @param grpLockKey Collection of group lock keys if this is a group-lock transaction. */ public GridNearTxRemote( - GridCacheSharedContext<K, V> ctx, + GridCacheSharedContext ctx, UUID nodeId, UUID nearNodeId, GridCacheVersion nearXidVer, @@ -276,12 +276,12 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter { private boolean addEntry(IgniteTxEntry entry) throws IgniteCheckedException { checkInternal(entry.txKey()); - GridCacheContext<K, V> cacheCtx = entry.context(); + GridCacheContext cacheCtx = entry.context(); if (!cacheCtx.isNear()) cacheCtx = cacheCtx.dht().near().context(); - GridNearCacheEntry<K, V> cached = cacheCtx.near().peekExx(entry.key()); + GridNearCacheEntry cached = cacheCtx.near().peekExx(entry.key()); if (cached == null) { evicted.add(entry.txKey()); @@ -292,14 +292,14 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter { cached.unswap(); try { - if (cached.peek(GLOBAL, CU.<K, V>empty()) == null && cached.evictInternal(false, xidVer, null)) { + if (cached.peek(GLOBAL, CU.empty()) == null && cached.evictInternal(false, xidVer, null)) { evicted.add(entry.txKey()); return false; } else { // Initialize cache entry. - entry.cached(cached, entry.keyBytes()); + entry.cached(cached, null); writeMap.put(entry.txKey(), entry); @@ -329,17 +329,17 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter { * @return {@code True} if entry has been enlisted. */ public boolean addEntry( - GridCacheContext<K, V> cacheCtx, + GridCacheContext cacheCtx, IgniteTxKey key, byte[] keyBytes, GridCacheOperation op, - V val, + CacheObject val, byte[] valBytes, @Nullable GridCacheVersion drVer ) throws IgniteCheckedException { checkInternal(key); - GridNearCacheEntry<K, V> cached = cacheCtx.near().peekExx(key.key()); + GridNearCacheEntry cached = cacheCtx.near().peekExx(key.key()); try { if (cached == null) { @@ -350,7 +350,7 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter { else { cached.unswap(); - if (cached.peek(GLOBAL, CU.<K, V>empty()) == null && cached.evictInternal(false, xidVer, null)) { + if (cached.peek(GLOBAL, CU.empty()) == null && cached.evictInternal(false, xidVer, null)) { cached.context().cache().removeIfObsolete(key.key()); evicted.add(key); @@ -358,7 +358,7 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter { return false; } else { - IgniteTxEntry txEntry = new IgniteTxEntry<>(cacheCtx, + IgniteTxEntry txEntry = new IgniteTxEntry(cacheCtx, this, op, val, @@ -366,9 +366,9 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter { -1L, cached, drVer); - - txEntry.keyBytes(keyBytes); - txEntry.valueBytes(valBytes); +// TODO IGNITE-51. +// txEntry.keyBytes(keyBytes); +// txEntry.valueBytes(valBytes); writeMap.put(key, txEntry); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccEntryExtras.java index 232bbdb..360a8cb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccEntryExtras.java @@ -76,18 +76,18 @@ public class GridCacheAttributesMvccEntryExtras extends GridCacheEntryExtrasAdap return this; } else - return new GridCacheAttributesEntryExtras<>(attrData); + return new GridCacheAttributesEntryExtras(attrData); } /** {@inheritDoc} */ @Override public GridCacheEntryExtras obsoleteVersion(GridCacheVersion obsoleteVer) { - return obsoleteVer != null ? new GridCacheAttributesMvccObsoleteEntryExtras<>(attrData, mvcc, obsoleteVer) : + return obsoleteVer != null ? new GridCacheAttributesMvccObsoleteEntryExtras(attrData, mvcc, obsoleteVer) : this; } /** {@inheritDoc} */ @Override public GridCacheEntryExtras ttlAndExpireTime(long ttl, long expireTime) { - return ttl != 0 ? new GridCacheAttributesMvccTtlEntryExtras<>(attrData, mvcc, ttl, expireTime) : this; + return ttl != 0 ? new GridCacheAttributesMvccTtlEntryExtras(attrData, mvcc, ttl, expireTime) : this; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccTtlEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccTtlEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccTtlEntryExtras.java index 41b4c71..0eaea58 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccTtlEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesMvccTtlEntryExtras.java @@ -72,7 +72,7 @@ public class GridCacheAttributesMvccTtlEntryExtras extends GridCacheEntryExtrasA return this; } else - return new GridCacheMvccTtlEntryExtras<>(mvcc, ttl ,expireTime); + return new GridCacheMvccTtlEntryExtras(mvcc, ttl ,expireTime); } /** {@inheritDoc} */ @@ -88,12 +88,12 @@ public class GridCacheAttributesMvccTtlEntryExtras extends GridCacheEntryExtrasA return this; } else - return new GridCacheAttributesTtlEntryExtras<>(attrData, ttl, expireTime); + return new GridCacheAttributesTtlEntryExtras(attrData, ttl, expireTime); } /** {@inheritDoc} */ @Override public GridCacheEntryExtras obsoleteVersion(GridCacheVersion obsoleteVer) { - return obsoleteVer != null ? new GridCacheAttributesMvccObsoleteTtlEntryExtras<>(attrData, mvcc, obsoleteVer, + return obsoleteVer != null ? new GridCacheAttributesMvccObsoleteTtlEntryExtras(attrData, mvcc, obsoleteVer, ttl, expireTime) : this; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesObsoleteTtlEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesObsoleteTtlEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesObsoleteTtlEntryExtras.java index a859064..4504a09 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesObsoleteTtlEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesObsoleteTtlEntryExtras.java @@ -72,12 +72,12 @@ public class GridCacheAttributesObsoleteTtlEntryExtras extends GridCacheEntryExt return this; } else - return new GridCacheObsoleteTtlEntryExtras<>(obsoleteVer, ttl, expireTime); + return new GridCacheObsoleteTtlEntryExtras(obsoleteVer, ttl, expireTime); } /** {@inheritDoc} */ @Override public GridCacheEntryExtras mvcc(GridCacheMvcc mvcc) { - return mvcc != null ? new GridCacheAttributesMvccObsoleteTtlEntryExtras<>(attrData, mvcc, obsoleteVer, ttl, + return mvcc != null ? new GridCacheAttributesMvccObsoleteTtlEntryExtras(attrData, mvcc, obsoleteVer, ttl, expireTime) : this; } @@ -94,7 +94,7 @@ public class GridCacheAttributesObsoleteTtlEntryExtras extends GridCacheEntryExt return this; } else - return new GridCacheAttributesTtlEntryExtras<>(attrData, ttl, expireTime); + return new GridCacheAttributesTtlEntryExtras(attrData, ttl, expireTime); } /** {@inheritDoc} */ @@ -116,7 +116,7 @@ public class GridCacheAttributesObsoleteTtlEntryExtras extends GridCacheEntryExt return this; } else - return new GridCacheAttributesObsoleteEntryExtras<>(attrData, obsoleteVer); + return new GridCacheAttributesObsoleteEntryExtras(attrData, obsoleteVer); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesTtlEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesTtlEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesTtlEntryExtras.java index baaee7c..5616a87 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesTtlEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesTtlEntryExtras.java @@ -98,7 +98,7 @@ public class GridCacheAttributesTtlEntryExtras extends GridCacheEntryExtrasAdapt return this; } else - return new GridCacheAttributesEntryExtras<>(attrData); + return new GridCacheAttributesEntryExtras(attrData); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccEntryExtras.java index 56fe584..6615230 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccEntryExtras.java @@ -42,7 +42,7 @@ public class GridCacheMvccEntryExtras extends GridCacheEntryExtrasAdapter { /** {@inheritDoc} */ @Override public GridCacheEntryExtras attributesData(GridLeanMap<String, Object> attrData) { - return attrData != null ? new GridCacheAttributesMvccEntryExtras<>(attrData, mvcc) : this; + return attrData != null ? new GridCacheAttributesMvccEntryExtras(attrData, mvcc) : this; } /** {@inheritDoc} */ @@ -63,12 +63,12 @@ public class GridCacheMvccEntryExtras extends GridCacheEntryExtrasAdapter { /** {@inheritDoc} */ @Override public GridCacheEntryExtras obsoleteVersion(GridCacheVersion obsoleteVer) { - return obsoleteVer != null ? new GridCacheMvccObsoleteEntryExtras<>(mvcc, obsoleteVer) : this; + return obsoleteVer != null ? new GridCacheMvccObsoleteEntryExtras(mvcc, obsoleteVer) : this; } /** {@inheritDoc} */ @Override public GridCacheEntryExtras ttlAndExpireTime(long ttl, long expireTime) { - return ttl != 0 ? new GridCacheMvccTtlEntryExtras<>(mvcc, ttl, expireTime) : this; + return ttl != 0 ? new GridCacheMvccTtlEntryExtras(mvcc, ttl, expireTime) : this; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccObsoleteTtlEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccObsoleteTtlEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccObsoleteTtlEntryExtras.java index 51dd029..407cf44 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccObsoleteTtlEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccObsoleteTtlEntryExtras.java @@ -60,7 +60,7 @@ public class GridCacheMvccObsoleteTtlEntryExtras extends GridCacheEntryExtrasAda /** {@inheritDoc} */ @Override public GridCacheEntryExtras attributesData(GridLeanMap<String, Object> attrData) { - return attrData != null ? new GridCacheAttributesMvccObsoleteTtlEntryExtras<>(attrData, mvcc, obsoleteVer, ttl, + return attrData != null ? new GridCacheAttributesMvccObsoleteTtlEntryExtras(attrData, mvcc, obsoleteVer, ttl, expireTime) : this; } @@ -93,7 +93,7 @@ public class GridCacheMvccObsoleteTtlEntryExtras extends GridCacheEntryExtrasAda return this; } else - return new GridCacheMvccTtlEntryExtras<>(mvcc, ttl, expireTime); + return new GridCacheMvccTtlEntryExtras(mvcc, ttl, expireTime); } /** {@inheritDoc} */ @@ -115,7 +115,7 @@ public class GridCacheMvccObsoleteTtlEntryExtras extends GridCacheEntryExtrasAda return this; } else - return new GridCacheMvccObsoleteEntryExtras<>(mvcc, obsoleteVer); + return new GridCacheMvccObsoleteEntryExtras(mvcc, obsoleteVer); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteEntryExtras.java index 003fad5..82cfc85 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteEntryExtras.java @@ -47,7 +47,7 @@ public class GridCacheObsoleteEntryExtras extends GridCacheEntryExtrasAdapter { /** {@inheritDoc} */ @Override public GridCacheEntryExtras mvcc(GridCacheMvcc mvcc) { - return mvcc != null ? new GridCacheMvccObsoleteEntryExtras<>(mvcc, obsoleteVer) : this; + return mvcc != null ? new GridCacheMvccObsoleteEntryExtras(mvcc, obsoleteVer) : this; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteTtlEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteTtlEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteTtlEntryExtras.java index 8442d7c..c780136 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteTtlEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheObsoleteTtlEntryExtras.java @@ -59,7 +59,7 @@ public class GridCacheObsoleteTtlEntryExtras extends GridCacheEntryExtrasAdapter /** {@inheritDoc} */ @Override public GridCacheEntryExtras mvcc(GridCacheMvcc mvcc) { - return mvcc != null ? new GridCacheMvccObsoleteTtlEntryExtras<>(mvcc, obsoleteVer, ttl, expireTime) : this; + return mvcc != null ? new GridCacheMvccObsoleteTtlEntryExtras(mvcc, obsoleteVer, ttl, expireTime) : this; } /** {@inheritDoc} */ @@ -75,7 +75,7 @@ public class GridCacheObsoleteTtlEntryExtras extends GridCacheEntryExtrasAdapter return this; } else - return new GridCacheTtlEntryExtras<>(ttl, expireTime); + return new GridCacheTtlEntryExtras(ttl, expireTime); } /** {@inheritDoc} */ @@ -97,7 +97,7 @@ public class GridCacheObsoleteTtlEntryExtras extends GridCacheEntryExtrasAdapter return this; } else - return new GridCacheObsoleteEntryExtras<>(obsoleteVer); + return new GridCacheObsoleteEntryExtras(obsoleteVer); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheTtlEntryExtras.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheTtlEntryExtras.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheTtlEntryExtras.java index 130186a..a723063 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheTtlEntryExtras.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheTtlEntryExtras.java @@ -52,7 +52,7 @@ public class GridCacheTtlEntryExtras extends GridCacheEntryExtrasAdapter { /** {@inheritDoc} */ @Override public GridCacheEntryExtras mvcc(GridCacheMvcc mvcc) { - return mvcc != null ? new GridCacheMvccTtlEntryExtras<>(mvcc, ttl, expireTime) : this; + return mvcc != null ? new GridCacheMvccTtlEntryExtras(mvcc, ttl, expireTime) : this; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 9ec6eeb..7a0c5d8 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 @@ -71,11 +71,18 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @Override protected void init() { - map.setEntryFactory(new GridCacheMapEntryFactory<K, V>() { + map.setEntryFactory(new GridCacheMapEntryFactory() { /** {@inheritDoc} */ - @Override public GridCacheMapEntry<K, V> create(GridCacheContext<K, V> ctx, long topVer, K key, int hash, - V val, GridCacheMapEntry<K, V> next, long ttl, int hdrId) { - return new GridLocalCacheEntry<>(ctx, key, hash, val, next, ttl, hdrId); + @Override public GridCacheMapEntry create(GridCacheContext ctx, + long topVer, + KeyCacheObject key, + int hash, + CacheObject val, + GridCacheMapEntry next, + long ttl, + int hdrId) + { + return new GridLocalCacheEntry(ctx, key, hash, val, next, ttl, hdrId); } }); } @@ -84,22 +91,22 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { * @param key Key of entry. * @return Cache entry. */ - @Nullable GridLocalCacheEntry<K, V> peekExx(K key) { - return (GridLocalCacheEntry<K,V>)peekEx(key); + @Nullable GridLocalCacheEntry peekExx(KeyCacheObject key) { + return (GridLocalCacheEntry)peekEx(key); } /** * @param key Key of entry. * @return Cache entry. */ - GridLocalCacheEntry<K, V> entryExx(K key) { - return (GridLocalCacheEntry<K, V>)entryEx(key); + GridLocalCacheEntry entryExx(KeyCacheObject key) { + return (GridLocalCacheEntry)entryEx(key); } /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> txLockAsync(Collection<? extends K> keys, long timeout, - IgniteTxLocalEx<K, V> tx, + IgniteTxLocalEx tx, boolean isRead, boolean retval, TransactionIsolation isolation, @@ -112,7 +119,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, IgnitePredicate<Cache.Entry<K, V>>[] filter) { - IgniteTxLocalEx<K, V> tx = ctx.tm().localTx(); + IgniteTxLocalEx tx = ctx.tm().localTx(); return lockAllAsync(keys, timeout, tx, filter); } @@ -124,8 +131,10 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { * @param filter Filter. * @return Future. */ - public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, - @Nullable IgniteTxLocalEx<K, V> tx, IgnitePredicate<Cache.Entry<K, V>>[] filter) { + public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, + long timeout, + @Nullable IgniteTxLocalEx tx, + IgnitePredicate<Cache.Entry<K, V>>[] filter) { if (F.isEmpty(keys)) return new GridFinishedFuture<>(ctx.kernalContext(), true); @@ -134,10 +143,10 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { try { for (K key : keys) { while (true) { - GridLocalCacheEntry<K, V> entry = null; + GridLocalCacheEntry entry = null; try { - entry = entryExx(key); + entry = entryExx(ctx.toCacheKeyObject(key)); if (!ctx.isAll(entry, filter)) { fut.onFailed(); @@ -181,7 +190,7 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> { long topVer = ctx.affinity().affinityTopologyVersion(); for (K key : keys) { - GridLocalCacheEntry<K, V> entry = peekExx(key); + GridLocalCacheEntry entry = peekExx(ctx.toCacheKeyObject(key)); if (entry != null && ctx.isAll(entry, filter)) { entry.releaseLocal(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockCallback.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockCallback.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockCallback.java index e5a4a7a..72e4f73 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockCallback.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockCallback.java @@ -23,7 +23,7 @@ import org.apache.ignite.internal.processors.cache.*; * @param <K> Key type. * @param <V> Value type. */ -interface GridLocalLockCallback<K, V> { +interface GridLocalLockCallback { /** * Called when entry lock ownership changes. This call * happens outside of synchronization so external callbacks @@ -33,6 +33,7 @@ interface GridLocalLockCallback<K, V> { * @param prev Previous candidate. * @param owner Current candidate. */ - public void onOwnerChanged(GridLocalCacheEntry<K, V> entry, GridCacheMvccCandidate prev, + public void onOwnerChanged(GridLocalCacheEntry entry, + GridCacheMvccCandidate prev, GridCacheMvccCandidate owner); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java index 0cd6751..b2797a4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java @@ -38,7 +38,7 @@ import java.util.concurrent.atomic.*; * Cache lock future. */ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> - implements GridCacheMvccFuture<K, V, Boolean> { + implements GridCacheMvccFuture<Boolean> { /** */ private static final long serialVersionUID = 0L; @@ -59,7 +59,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> /** Keys locked so far. */ @GridToStringExclude - private List<GridLocalCacheEntry<K, V>> entries; + private List<GridLocalCacheEntry> entries; /** Future ID. */ private IgniteUuid futId; @@ -85,7 +85,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> private IgnitePredicate<Cache.Entry<K, V>>[] filter; /** Transaction. */ - private IgniteTxLocalEx<K, V> tx; + private IgniteTxLocalEx tx; /** Trackable flag. */ private boolean trackable = true; @@ -108,7 +108,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> GridLocalLockFuture( GridCacheContext<K, V> cctx, Collection<? extends K> keys, - IgniteTxLocalEx<K, V> tx, + IgniteTxLocalEx tx, GridLocalCache<K, V> cache, long timeout, IgnitePredicate<Cache.Entry<K, V>>[] filter) { @@ -180,7 +180,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> /** * @return Entries. */ - List<GridLocalCacheEntry<K, V>> entries() { + List<GridLocalCacheEntry> entries() { return entries; } @@ -216,7 +216,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> * @return Lock candidate. * @throws GridCacheEntryRemovedException If entry was removed. */ - @Nullable GridCacheMvccCandidate addEntry(GridLocalCacheEntry<K, V> entry) + @Nullable GridCacheMvccCandidate addEntry(GridLocalCacheEntry entry) throws GridCacheEntryRemovedException { // Add local lock first, as it may throw GridCacheEntryRemovedException. GridCacheMvccCandidate c = entry.addLocal( @@ -251,7 +251,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> * Undoes all locks. */ private void undoLocks() { - for (GridLocalCacheEntry<K, V> e : entries) { + for (GridLocalCacheEntry e : entries) { try { e.removeLock(lockVer); } @@ -325,7 +325,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> log.debug("Got removed entry in onOwnerChanged method (will retry): " + cached); // Replace old entry with new one. - entries.add(i, (GridLocalCacheEntry<K,V>)cache.entryEx(cached.key())); + entries.add(i, (GridLocalCacheEntry)cache.entryEx(cached.key())); } } } @@ -357,7 +357,7 @@ public final class GridLocalLockFuture<K, V> extends GridFutureAdapter<Boolean> log.debug("Got removed entry in onOwnerChanged method (will retry): " + cached); // Replace old entry with new one. - entries.add(i, (GridLocalCacheEntry<K,V>)cache.entryEx(cached.key())); + entries.add(i, (GridLocalCacheEntry)cache.entryEx(cached.key())); } } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 a5ff01a..5c94223 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 @@ -35,12 +35,12 @@ import static org.apache.ignite.transactions.TransactionState.*; /** * Local cache transaction. */ -class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { +class GridLocalTx extends IgniteTxLocalAdapter { /** */ private static final long serialVersionUID = 0L; /** Transaction future. */ - private final AtomicReference<GridLocalTxFuture<K, V>> fut = new AtomicReference<>(); + private final AtomicReference<GridLocalTxFuture> fut = new AtomicReference<>(); /** * Empty constructor required for {@link Externalizable}. @@ -59,7 +59,7 @@ class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { * @param timeout Timeout. */ GridLocalTx( - GridCacheSharedContext<K, V> ctx, + GridCacheSharedContext ctx, boolean implicit, boolean implicitSingle, TransactionConcurrency concurrency, @@ -75,7 +75,7 @@ class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { /** {@inheritDoc} */ @Override public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner) { - GridLocalTxFuture<K, V> fut = this.fut.get(); + GridLocalTxFuture fut = this.fut.get(); return fut != null && fut.onOwnerChanged(entry, owner); } @@ -156,7 +156,7 @@ class GridLocalTx<K, V> extends IgniteTxLocalAdapter<K, V> { return new GridFinishedFuture<>(cctx.kernalContext(), e); } - GridLocalTxFuture<K, V> fut = this.fut.get(); + GridLocalTxFuture fut = this.fut.get(); if (fut == null) { if (this.fut.compareAndSet(null, fut = new GridLocalTxFuture<>(cctx, this))) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTxFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTxFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTxFuture.java index b978c89..619ce38 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTxFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalTxFuture.java @@ -38,7 +38,7 @@ import static org.apache.ignite.transactions.TransactionState.*; * Replicated cache transaction future. */ final class GridLocalTxFuture<K, V> extends GridFutureAdapter<IgniteInternalTx> - implements GridCacheMvccFuture<K, V, IgniteInternalTx> { + implements GridCacheMvccFuture<IgniteInternalTx> { /** */ private static final long serialVersionUID = 0L; @@ -54,7 +54,7 @@ final class GridLocalTxFuture<K, V> extends GridFutureAdapter<IgniteInternalTx> /** Cache transaction. */ @GridToStringExclude // Need to exclude due to circular dependencies. - private GridLocalTx<K, V> tx; + private GridLocalTx tx; /** Error. */ private AtomicReference<Throwable> err = new AtomicReference<>(null); @@ -82,7 +82,7 @@ final class GridLocalTxFuture<K, V> extends GridFutureAdapter<IgniteInternalTx> */ GridLocalTxFuture( GridCacheSharedContext<K, V> cctx, - GridLocalTx<K, V> tx) { + GridLocalTx tx) { super(cctx.kernalContext()); assert cctx != null; @@ -128,7 +128,7 @@ final class GridLocalTxFuture<K, V> extends GridFutureAdapter<IgniteInternalTx> /** * @return Lock version. */ - GridLocalTx<K, V> tx() { + GridLocalTx tx() { return tx; } @@ -218,7 +218,7 @@ final class GridLocalTxFuture<K, V> extends GridFutureAdapter<IgniteInternalTx> if (log.isDebugEnabled()) log.debug("Got removed entry in checkLocks method (will retry): " + txEntry); - txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), txEntry.keyBytes()); + txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), null); } } } @@ -239,7 +239,7 @@ final class GridLocalTxFuture<K, V> extends GridFutureAdapter<IgniteInternalTx> for (IgniteTxEntry txEntry : tx.writeMap().values()) { while (true) { try { - GridCacheEntryEx<K,V> cached = txEntry.cached(); + GridCacheEntryEx cached = txEntry.cached(); if (entry == null) { onError(new IgniteTxRollbackCheckedException("Failed to find cache entry for " + @@ -264,7 +264,7 @@ final class GridLocalTxFuture<K, V> extends GridFutureAdapter<IgniteInternalTx> if (log.isDebugEnabled()) log.debug("Got removed entry in onOwnerChanged method (will retry): " + txEntry); - txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), txEntry.keyBytes()); + txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), null); } } }