Skip to content

Commit 21f6514

Browse files
committed
IGNITE-26608 Improved JavaDocs.
1 parent 16726a2 commit 21f6514

3 files changed

Lines changed: 19 additions & 17 deletions

File tree

modules/commons/src/main/java/org/apache/ignite/internal/thread/context/concurrent/ContextAwareExecutor.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
package org.apache.ignite.internal.thread.context.concurrent;
1919

2020
import java.util.concurrent.Executor;
21+
import org.apache.ignite.internal.thread.context.Context;
22+
import org.apache.ignite.internal.thread.context.ContextSnapshot;
2123
import org.apache.ignite.internal.thread.context.function.ContextAwareRunnable;
2224
import org.jetbrains.annotations.NotNull;
2325

@@ -37,9 +39,9 @@ private ContextAwareExecutor(Executor delegate) {
3739
}
3840

3941
/**
40-
* Creates executor wrapper that automatically captures Context Snapshot for the thread that
41-
* invokes task execution. Captured Context will be restored before task execution, potentially in another
42-
* thread.
42+
* Creates executor wrapper that automatically captures {@link ContextSnapshot} of {@link Context} for the thread
43+
* that invokes task execution. Captured {@link ContextSnapshot} will be restored before task execution, potentially
44+
* in another thread.
4345
*/
4446
public static Executor wrap(Executor delegate) {
4547
return delegate == null ? null : new ContextAwareExecutor(delegate);

modules/commons/src/main/java/org/apache/ignite/internal/thread/context/function/ContextAwareCallable.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ private ContextAwareCallable(Callable<T> delegate, ContextSnapshot snapshot) {
4040
}
4141

4242
/**
43-
* Creates a wrapper that stores a specified {@link Callable} along with the Snapshot of the Context bound
44-
* to the thread when this method is called. Captured Context will be restored before {@link Callable} execution,
45-
* potentially in another thread.
43+
* Creates a wrapper that stores a specified {@link Callable} along with the {@link ContextSnapshot} of {@link Context}
44+
* bound to the thread when this method is called. Captured {@link ContextSnapshot} will be restored before
45+
* {@link Callable} execution, potentially in another thread.
4646
*/
4747
public static <T> Callable<T> wrap(Callable<T> delegate) {
4848
return wrap(delegate, ContextAwareCallable::new);
4949
}
5050

5151
/**
52-
* Creates a wrapper that stores a specified {@link Callable} along with the Snapshot of the Context bound
53-
* to the thread when this method is called. Captured Context will be restored before {@link Callable} execution,
54-
* potentially in another thread.
55-
* If Context holds no data when this method is called, it does nothing and returns original {@link Callable}.
52+
* Creates a wrapper that stores a specified {@link Callable} along with the {@link ContextSnapshot} of {@link Context}
53+
* bound to the thread when this method is called. Captured {@link ContextSnapshot} will be restored before
54+
* {@link Callable} execution, potentially in another thread.
55+
* If {@link Context} holds no data when this method is called, it does nothing and returns original {@link Callable}.
5656
*/
5757
public static <T> Callable<T> wrapIfContextNotEmpty(Callable<T> delegate) {
5858
return wrap(delegate, ContextAwareCallable::new, true);

modules/commons/src/main/java/org/apache/ignite/internal/thread/context/function/ContextAwareRunnable.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ public ContextAwareRunnable(Runnable delegate, ContextSnapshot snapshot) {
3737
}
3838

3939
/**
40-
* Creates a wrapper that stores a specified {@link Runnable} along with the Snapshot of the Context bound
41-
* to the thread when this method is called. Captured Context will be restored before {@link Runnable} execution,
42-
* potentially in another thread.
40+
* Creates a wrapper that stores a specified {@link Runnable} along with the {@link ContextSnapshot} of {@link Context}
41+
* bound to the thread when this method is called. Captured {@link ContextSnapshot} will be restored before
42+
* {@link Runnable} execution, potentially in another thread.
4343
*/
4444
public static Runnable wrap(Runnable delegate) {
4545
return wrap(delegate, ContextAwareRunnable::new);
4646
}
4747

4848
/**
49-
* Creates a wrapper that stores a specified {@link Runnable} along with the Snapshot of the Context bound
50-
* to the thread when this method is called. Captured Context will be restored before {@link Runnable} execution,
51-
* potentially in another thread.
52-
* If Context holds no data when this method is called, it does nothing and returns original {@link Runnable}.
49+
* Creates a wrapper that stores a specified {@link Runnable} along with the {@link ContextSnapshot} of {@link Context}
50+
* bound to the thread when this method is called. Captured {@link ContextSnapshot} will be restored before
51+
* {@link Runnable} execution, potentially in another thread.
52+
* If {@link Context} holds no data when this method is called, it does nothing and returns original {@link Runnable}.
5353
*/
5454
public static Runnable wrapIfContextNotEmpty(Runnable delegate) {
5555
return wrap(delegate, ContextAwareRunnable::new, true);

0 commit comments

Comments
 (0)