Package com.alibaba.ttl.threadpool
Class TtlForkJoinPoolHelper
java.lang.Object
com.alibaba.ttl.threadpool.TtlForkJoinPoolHelper
Util methods to wrap/check/unwrap methods for disable Inheritable wrapper of
ForkJoinPool.ForkJoinWorkerThreadFactory
.
Note:
all method is null
-safe.
for wrap/unwrap methods when input parameter is null
, return null
.
for check methods when input parameter is null
, return false
.
- Since:
- 2.10.1
- Author:
- Jerry Lee (oldratlee at gmail dot com)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionWrapper ofForkJoinPool.defaultForkJoinWorkerThreadFactory
, disable inheritable.getDisableInheritableForkJoinWorkerThreadFactory
(ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory) Wrapper ofForkJoinPool.ForkJoinWorkerThreadFactory
, disable inheritable.static boolean
isDisableInheritableForkJoinWorkerThreadFactory
(ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory) check theForkJoinPool.ForkJoinWorkerThreadFactory
isDisableInheritableForkJoinWorkerThreadFactory
or not.unwrap
(ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory) UnwrapDisableInheritableForkJoinWorkerThreadFactory
to the original/underneath one.
-
Method Details
-
getDisableInheritableForkJoinWorkerThreadFactory
@Nullable @Contract(value="null -> null; !null -> !null", pure=true) public static ForkJoinPool.ForkJoinWorkerThreadFactory getDisableInheritableForkJoinWorkerThreadFactory(@Nullable ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory) Wrapper ofForkJoinPool.ForkJoinWorkerThreadFactory
, disable inheritable.- Parameters:
threadFactory
- input thread factory- Since:
- 2.10.1
- See Also:
-
getDefaultDisableInheritableForkJoinWorkerThreadFactory
@NonNull public static ForkJoinPool.ForkJoinWorkerThreadFactory getDefaultDisableInheritableForkJoinWorkerThreadFactory()Wrapper ofForkJoinPool.defaultForkJoinWorkerThreadFactory
, disable inheritable. -
isDisableInheritableForkJoinWorkerThreadFactory
public static boolean isDisableInheritableForkJoinWorkerThreadFactory(@Nullable ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory) check theForkJoinPool.ForkJoinWorkerThreadFactory
isDisableInheritableForkJoinWorkerThreadFactory
or not. -
unwrap
@Nullable @Contract(value="null -> null; !null -> !null", pure=true) public static ForkJoinPool.ForkJoinWorkerThreadFactory unwrap(@Nullable ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory) UnwrapDisableInheritableForkJoinWorkerThreadFactory
to the original/underneath one.- Since:
- 2.10.1
- See Also:
-