|
2 | 2 |
|
3 | 3 | import com.alibaba.crr.composite.Backup;
|
4 | 4 | import com.alibaba.crr.composite.Capture;
|
5 |
| -import com.alibaba.ttl3.executor.TtlExecutors; |
6 | 5 | import com.alibaba.ttl3.spi.TtlEnhanced;
|
7 | 6 | import com.alibaba.ttl3.spi.TtlWrapper;
|
8 | 7 | import edu.umd.cs.findbugs.annotations.NonNull;
|
9 | 8 | import edu.umd.cs.findbugs.annotations.Nullable;
|
10 | 9 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
11 | 10 | import org.jetbrains.annotations.Contract;
|
12 | 11 |
|
13 |
| -import java.util.concurrent.Callable; |
14 | 12 | import java.util.function.*;
|
15 | 13 |
|
16 | 14 | import static com.alibaba.ttl3.transmitter.Transmitter.*;
|
|
30 | 28 | * <ul>
|
31 | 29 | * <li>all methods is {@code null}-safe, when input parameter is {@code null}, return {@code null}.</li>
|
32 | 30 | * <li>all wrap method skip wrapping (aka. just return input parameter), when input parameter is already wrapped.</li>
|
33 |
| - * <li>the wrap methods for {@link Runnable} and {@link java.util.concurrent.Callable} are provided |
34 |
| - * by {@link TtlRunnable#get(Runnable)} and {@link TtlCallable#get(Callable)}.</li> |
| 31 | + * <li>the wrap methods for {@link Runnable} and {@link java.util.concurrent.Callable Callable} are provided |
| 32 | + * by {@link TtlRunnable#get(Runnable)} and {@link TtlCallable#get(java.util.concurrent.Callable) TtlCallable.get(Callable)}.</li> |
| 33 | + * <li>the wrap methods for {@link java.util.concurrent.Executor Executor} are provided |
| 34 | + * by {@link com.alibaba.ttl3.executor.TtlExecutors TtlExecutors}.</li> |
35 | 35 | * </ul>
|
36 | 36 | *
|
37 | 37 | * @author Jerry Lee (oldratlee at gmail dot com)
|
38 | 38 | * @author huangfei1101 (fei.hf at alibaba-inc dot com)
|
39 | 39 | * @see TtlRunnable
|
40 | 40 | * @see TtlCallable
|
41 | 41 | * @see TtlWrapper
|
| 42 | + * @see com.alibaba.ttl3.executor.TtlExecutors TtlExecutors |
42 | 43 | */
|
43 | 44 | public final class TtlWrappers {
|
44 | 45 | /**
|
@@ -122,17 +123,23 @@ public static <T, U, R> BiFunction<T, U, R> wrapBiFunction(@Nullable BiFunction<
|
122 | 123 | * this method is {@code null}-safe, when input parameter is {@code null}, return {@code null};
|
123 | 124 | * if input parameter is not a {@link TtlWrapper} just return input.
|
124 | 125 | *
|
125 |
| - * @see TtlRunnable#unwrap(Runnable) |
126 |
| - * @see TtlCallable#unwrap(java.util.concurrent.Callable) |
127 |
| - * @see TtlExecutors#unwrapTtlExecutor(java.util.concurrent.Executor) |
128 |
| - * @see TtlExecutors#unwrapDisableInheritableThreadFactory(java.util.concurrent.ThreadFactory) |
129 |
| - * @see TtlExecutors#unwrapDisableInheritableForkJoinWorkerThreadFactory(java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory) |
130 |
| - * @see TtlExecutors#unwrapTtlRunnableUnwrapComparator(java.util.Comparator) |
131 | 126 | * @see TtlWrappers#wrapSupplier(Supplier)
|
132 | 127 | * @see TtlWrappers#wrapConsumer(Consumer)
|
133 | 128 | * @see TtlWrappers#wrapBiConsumer(BiConsumer)
|
134 | 129 | * @see TtlWrappers#wrapFunction(Function)
|
135 | 130 | * @see TtlWrappers#wrapBiFunction(BiFunction)
|
| 131 | + * @see TtlRunnable#get(Runnable) |
| 132 | + * @see TtlCallable#get(java.util.concurrent.Callable) TtlCallable.get(Callable) |
| 133 | + * @see com.alibaba.ttl3.executor.TtlExecutors#getTtlExecutor(java.util.concurrent.Executor) TtlExecutors.getTtlExecutor(Executor) |
| 134 | + * @see com.alibaba.ttl3.executor.TtlExecutors#getTtlExecutorService(java.util.concurrent.ExecutorService) TtlExecutors.getTtlExecutorService(ExecutorService) |
| 135 | + * @see com.alibaba.ttl3.executor.TtlExecutors#getDisableInheritableThreadFactory(java.util.concurrent.ThreadFactory) TtlExecutors.getDisableInheritableThreadFactory(ThreadFactory) |
| 136 | + * @see com.alibaba.ttl3.executor.TtlExecutors#getDisableInheritableForkJoinWorkerThreadFactory(java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory) TtlExecutors.getDisableInheritableForkJoinWorkerThreadFactory(ForkJoinWorkerThreadFactory) |
| 137 | + * @see TtlRunnable#unwrap(Runnable) |
| 138 | + * @see TtlCallable#unwrap(java.util.concurrent.Callable) TtlCallable.unwrap(Callable) |
| 139 | + * @see com.alibaba.ttl3.executor.TtlExecutors#unwrapTtlExecutor(java.util.concurrent.Executor) TtlExecutors.unwrapTtlExecutor(Executor) |
| 140 | + * @see com.alibaba.ttl3.executor.TtlExecutors#unwrapDisableInheritableThreadFactory(java.util.concurrent.ThreadFactory) TtlExecutors.unwrapDisableInheritableThreadFactory(ThreadFactory) |
| 141 | + * @see com.alibaba.ttl3.executor.TtlExecutors#unwrapDisableInheritableForkJoinWorkerThreadFactory(java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory) TtlExecutors.unwrapDisableInheritableForkJoinWorkerThreadFactory(ForkJoinWorkerThreadFactory) |
| 142 | + * @see com.alibaba.ttl3.executor.TtlExecutors#unwrapTtlRunnableUnwrapComparator(java.util.Comparator) TtlExecutors.unwrapTtlRunnableUnwrapComparator(Comparator) |
136 | 143 | * @see #isWrapper(Object)
|
137 | 144 | */
|
138 | 145 | @Nullable
|
|
0 commit comments