Merge branch '6.1.x'

This commit is contained in:
Juergen Hoeller
2024-10-28 22:12:12 +01:00
4 changed files with 24 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,17 +35,18 @@ import org.springframework.aot.hint.annotation.Reflective;
* <p>In terms of target method signatures, any parameter types are supported.
* However, the return type is constrained to either {@code void} or
* {@link java.util.concurrent.Future}. In the latter case, you may declare the
* more specific {@link org.springframework.util.concurrent.ListenableFuture} or
* {@link java.util.concurrent.CompletableFuture} types which allow for richer
* interaction with the asynchronous task and for immediate composition with
* further processing steps.
* more specific {@link java.util.concurrent.CompletableFuture} type which allows
* for richer interaction with the asynchronous task and for immediate composition
* with further processing steps.
*
* <p>A {@code Future} handle returned from the proxy will be an actual asynchronous
* {@code Future} that can be used to track the result of the asynchronous method
* execution. However, since the target method needs to implement the same signature,
* it will have to return a temporary {@code Future} handle that just passes a value
* through: for example, Spring's {@link AsyncResult}, EJB 3.1's {@link jakarta.ejb.AsyncResult},
* or {@link java.util.concurrent.CompletableFuture#completedFuture(Object)}.
* {@code (Completable)Future} that can be used to track the result of the
* asynchronous method execution. However, since the target method needs to implement
* the same signature, it will have to return a temporary {@code Future} handle that
* just passes a value after computation in the execution thread: typically through
* {@link java.util.concurrent.CompletableFuture#completedFuture(Object)}. The
* provided value will be exposed to the caller through the actual asynchronous
* {@code Future} handle at runtime.
*
* @author Juergen Hoeller
* @author Chris Beams

View File

@@ -80,7 +80,9 @@ import org.springframework.util.concurrent.ListenableFuture;
* but rather just the hand-off to an execution thread.</b> As a consequence,
* a {@link ScheduledFuture} handle (for example, from {@link #schedule(Runnable, Instant)})
* represents that hand-off rather than the actual completion of the provided task
* (or series of repeated tasks).
* (or series of repeated tasks). Also, this scheduler participates in lifecycle
* management to a limited degree only, stopping trigger firing and fixed-delay
* task execution but not stopping the execution of handed-off tasks.
*
* <p>As an alternative to the built-in thread-per-task capability, this scheduler
* can also be configured with a separate target executor for scheduled task