Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@
/**
* Transaction created by system implicitly on remote nodes.
*/
public abstract class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
implements IgniteTxRemoteEx {
public abstract class GridDistributedTxRemoteAdapter extends IgniteTxAdapter implements IgniteTxRemoteEx {
/** Commit allowed field updater. */
private static final AtomicIntegerFieldUpdater<GridDistributedTxRemoteAdapter> COMMIT_ALLOWED_UPD =
AtomicIntegerFieldUpdater.newUpdater(GridDistributedTxRemoteAdapter.class, "commitAllowed");
Expand Down Expand Up @@ -155,7 +154,7 @@ protected GridDistributedTxRemoteAdapter(
int txSize,
@Nullable UUID subjId,
int taskNameHash,
String txLbl
@Nullable String txLbl
) {
super(
ctx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@
import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
import org.apache.ignite.internal.util.tostring.GridToStringBuilder;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.CI1;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
Expand Down Expand Up @@ -428,11 +426,7 @@ else if (!lockFut.isDone()) {
*/
final IgniteInternalFuture finalPrepFut = prepFut;

lockFut.listen(new IgniteInClosure<IgniteInternalFuture<?>>() {
@Override public void apply(IgniteInternalFuture<?> ignored) {
finishTx(false, finalPrepFut, fut);
}
});
lockFut.listen((IgniteInternalFuture<?> ignored) -> finishTx(false, finalPrepFut, fut));

return;
}
Expand Down Expand Up @@ -502,13 +496,8 @@ public IgniteInternalFuture<IgniteInternalTx> commitDhtLocalAsync() {
if (prep != null) {
if (prep.isDone())
finishTx(true, prep, fut);
else {
prep.listen(new CI1<IgniteInternalFuture<?>>() {
@Override public void apply(IgniteInternalFuture<?> f) {
finishTx(true, f, fut);
}
});
}
else
prep.listen((IgniteInternalFuture<?> f) -> finishTx(true, f, fut));
}
else {
assert optimistic();
Expand Down Expand Up @@ -556,11 +545,7 @@ public IgniteInternalFuture<IgniteInternalTx> rollbackDhtLocalAsync() {
if (prepFut != null) {
prepFut.complete();

prepFut.listen(new CI1<IgniteInternalFuture<?>>() {
@Override public void apply(IgniteInternalFuture<?> f) {
finishTx(false, f, fut);
}
});
prepFut.listen((IgniteInternalFuture<?> f) -> finishTx(false, f, fut));
}
else
finishTx(false, null, fut);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void explicitLock(boolean explicitLock) {
* @return Versions for all pending locks that were in queue before tx locks were released.
*/
Collection<GridCacheVersion> pendingVersions() {
return pendingVers == null ? Collections.<GridCacheVersion>emptyList() : pendingVers;
return pendingVers == null ? Collections.emptyList() : pendingVers;
}

/**
Expand Down Expand Up @@ -279,7 +279,7 @@ protected void mapExplicitLocks() {
for (IgniteTxEntry e : allEntries()) {
assert e.cached() != null;

GridCacheContext cacheCtx = e.cached().context();
GridCacheContext<?, ?> cacheCtx = e.cached().context();

if (cacheCtx.isNear())
continue;
Expand Down Expand Up @@ -470,9 +470,9 @@ private void addMapping(

checkInternal(e.txKey());

GridCacheContext cacheCtx = e.context();
GridCacheContext<?, ?> cacheCtx = e.context();

GridDhtCacheAdapter dhtCache = cacheCtx.isNear() ? cacheCtx.near().dht() : cacheCtx.dht();
GridDhtCacheAdapter<?, ?> dhtCache = cacheCtx.isNear() ? cacheCtx.near().dht() : cacheCtx.dht();

try {
IgniteTxEntry existing = entry(e.txKey());
Expand Down Expand Up @@ -575,7 +575,7 @@ IgniteInternalFuture<GridCacheReturn> lockAllAsync(
try {
AffinityTopologyVersion topVer = topologyVersion();

GridDhtCacheAdapter dhtCache = cacheCtx.isNear() ? cacheCtx.near().dht() : cacheCtx.dht();
GridDhtCacheAdapter<?, ?> dhtCache = cacheCtx.isNear() ? cacheCtx.near().dht() : cacheCtx.dht();

// Enlist locks into transaction.
for (int i = 0; i < entries.size(); i++) {
Expand Down Expand Up @@ -911,7 +911,7 @@ else if (updateLockFuture(fut, ROLLBACK_FUT))

/**
* @param prepFut Prepare future.
* @return If transaction if finished on prepare step returns future which is completed after transaction finish.
* @return If transaction is finished on prepare step returns future which is completed after transaction finish.
*/
protected final IgniteInternalFuture<GridNearTxPrepareResponse> chainOnePhasePrepare(
final GridDhtTxPrepareFuture prepFut) {
Expand Down
Loading