Deprecated
in favor of RefreshAuthTokenWrapper -- versions after 1.25.1 do not use RefreshAuthTokenTransformingFuture anymore
This is to account for scenarios where we have a valid/non-expired token but the permissions for the instance have changed since the token was issued and so on the server-side the presented token is considered invalid.
| Modifier and Type | Field and Description |
|---|---|
| private final RefreshableOnNotAuthenticatedProvider | |
| private Future | |
| private final Supplier | |
| private static final Logger | |
| private final Function |
| Access | Constructor and Description |
|---|---|
| public | RefreshAuthTokenTransformingFuture(Future<FROM> delegate, Function<FROM, TO> transformer, RefreshableOnNotAuthenticatedProvider<?> authProvider, Supplier<Future<FROM>> generateNewFutureForRetry)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | cancel(boolean
true if the thread
executing this task should be interrupted (if the thread is
known to the implementation); otherwise, in-progress tasks are
allowed to completeImplements java. Attempts to cancel execution of this task. |
| public TO | get()
Implements java. Waits if necessary for the computation to complete, and then retrieves its result. |
| public TO | get(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
| public boolean | isCancelled()
Implements java. Returns |
| public boolean |
| authProvider | back to summary |
|---|---|
| private final RefreshableOnNotAuthenticatedProvider<?> authProvider | |
| delegate | back to summary |
|---|---|
| private Future<FROM> delegate
| |
| generateNewFutureForRetry | back to summary |
|---|---|
| private final Supplier<Future<FROM>> generateNewFutureForRetry | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| transformer | back to summary |
|---|---|
| private final Function<FROM, TO> transformer | |
| RefreshAuthTokenTransformingFuture | back to summary |
|---|---|
| public RefreshAuthTokenTransformingFuture(Future<FROM> delegate, Function<FROM, TO> transformer, RefreshableOnNotAuthenticatedProvider<?> authProvider, Supplier<Future<FROM>> generateNewFutureForRetry) | |
| cancel | back to summary |
|---|---|
| public boolean cancel(boolean mayInterruptIfRunning) Implements java. Doc from java. Attempts to cancel execution of this task. This method has no
effect if the task is already completed or cancelled, or could
not be cancelled for some other reason. Otherwise, if this
task has not started when The return value from this method does not necessarily
indicate whether the task is now cancelled; use
| |
| get | back to summary |
|---|---|
| public TO get() throws InterruptedException, ExecutionException Implements java. Doc from java. Waits if necessary for the computation to complete, and then retrieves its result.
| |
| get | back to summary |
|---|---|
| public TO get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Implements java. Doc from java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements java. Doc from java. Returns
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements java. Doc from java. Returns
| |