anton-vinogradov commented on code in PR #10885:
URL: https://github.com/apache/ignite/pull/10885#discussion_r1291173747
##########
modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFinishedFuture.java:
##########
@@ -138,29 +147,37 @@ public GridFinishedFuture(Throwable err) {
}
}
+ /** {@inheritDoc} */
+ @Override public <R> IgniteInternalFuture<R> chain(final
IgniteOutClosure<R> doneCb) {
+ return chain(ignored -> doneCb.apply());
Review Comment:
Done
##########
modules/core/src/main/java/org/apache/ignite/internal/management/meta/MetadataRemoveTask.java:
##########
@@ -125,8 +125,8 @@ protected MetadataRemoveJob(@Nullable MetaRemoveCommandArg
arg, boolean debug) {
jobCtx.holdcc();
- future.listen((IgniteInClosure<IgniteInternalFuture<?>>)f
-> {
- if (f.isDone())
+ future.listen(() -> {
+ if (future.isDone())
Review Comment:
Whong comment?
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/isolated/IsolatedDiscoverySpi.java:
##########
@@ -173,8 +173,8 @@ public class IsolatedDiscoverySpi extends IgniteSpiAdapter
implements IgniteDisc
msg,
null));
- // Acknowledge message must be send after initial message
processed.
- fut.listen((f) -> {
+ // Acknowledge message must be sent after initial message
processed.
+ fut.listen(ignored -> {
Review Comment:
It's an IgniteFuture (which is a Public API) that was not changed at this
PR.
##########
modules/core/src/test/java/org/apache/ignite/internal/GridTaskFutureImplStopGridSelfTest.java:
##########
@@ -83,7 +81,7 @@ public void testGet() throws Exception {
try {
final ComputeTaskFuture<?> fut = executeAsync(ignite.compute(),
GridStopTestTask.class.getName(), null);
- fut.listen((CI1<IgniteFuture>)gridFut -> {
+ fut.listen(ignored -> {
Review Comment:
It's an IgniteFuture (which is a Public API) that was not changed at this PR.
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/incremental/AbstractIncrementalSnapshotBlockingTest.java:
##########
@@ -326,7 +326,7 @@ public void awaitSnpBlockedOrFinished(@Nullable
IgniteFuture<?> snpFut) {
if (latch == null)
return;
- snpFut.listen((f) -> latch.countDown());
+ snpFut.listen(ignored -> latch.countDown());
Review Comment:
It's an IgniteFuture (which is a Public API) that was not changed at this PR.
##########
modules/core/src/main/java/org/apache/ignite/internal/IgniteInternalFuture.java:
##########
@@ -111,6 +113,14 @@ public interface IgniteInternalFuture<R> {
@Async.Schedule
public void listen(IgniteInClosure<? super IgniteInternalFuture<R>> lsnr);
+ /**
+ * Registers listener closure to be asynchronously notified whenever
future completes.
+ *
+ * @param lsnr Listener closure to register. If not provided - this method
is no-op.
Review Comment:
We already have such check, see
https://github.com/apache/ignite/blob/4a47dc1ed858b5427e3d27458579242db12639b3/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java#L471
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]