Package com.alibaba.ttl.threadpool
Class TtlForkJoinPoolHelper
- java.lang.Object
-
- com.alibaba.ttl.threadpool.TtlForkJoinPoolHelper
-
public class TtlForkJoinPoolHelper extends Object
Util methods to wrap/unwrap/check methods to disable Inheritable forForkJoinPool.ForkJoinWorkerThreadFactory.Note:
all method is
null-safe, when input parameter(eg:ForkJoinPool.ForkJoinWorkerThreadFactory) isnull, returnnull.- Since:
- 2.10.1
- Author:
- Jerry Lee (oldratlee at gmail dot com)
- See Also:
ForkJoinPool,ForkJoinPool.ForkJoinWorkerThreadFactory,ForkJoinPool.defaultForkJoinWorkerThreadFactory,TtlUnwrap.unwrap(Object)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ForkJoinPool.ForkJoinWorkerThreadFactorygetDefaultDisableInheritableForkJoinWorkerThreadFactory()Wrapper ofForkJoinPool.defaultForkJoinWorkerThreadFactory, disable inheritable.static ForkJoinPool.ForkJoinWorkerThreadFactorygetDisableInheritableForkJoinWorkerThreadFactory(ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory)Wrapper ofForkJoinPool.ForkJoinWorkerThreadFactory, disable inheritable.static booleanisDisableInheritableForkJoinWorkerThreadFactory(ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory)check theForkJoinPool.ForkJoinWorkerThreadFactoryisDisableInheritableForkJoinWorkerThreadFactoryor not.static ForkJoinPool.ForkJoinWorkerThreadFactoryunwrap(ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory)UnwrapDisableInheritableForkJoinWorkerThreadFactoryto the original/underneath one.
-
-
-
Method Detail
-
getDisableInheritableForkJoinWorkerThreadFactory
@Nullable 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:
DisableInheritableForkJoinWorkerThreadFactory
-
getDefaultDisableInheritableForkJoinWorkerThreadFactory
@Nullable public static ForkJoinPool.ForkJoinWorkerThreadFactory getDefaultDisableInheritableForkJoinWorkerThreadFactory()
Wrapper ofForkJoinPool.defaultForkJoinWorkerThreadFactory, disable inheritable.- Since:
- 2.10.1
- See Also:
getDisableInheritableForkJoinWorkerThreadFactory(ForkJoinWorkerThreadFactory)
-
isDisableInheritableForkJoinWorkerThreadFactory
public static boolean isDisableInheritableForkJoinWorkerThreadFactory(@Nullable ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory)
check theForkJoinPool.ForkJoinWorkerThreadFactoryisDisableInheritableForkJoinWorkerThreadFactoryor not.- Since:
- 2.10.1
- See Also:
DisableInheritableForkJoinWorkerThreadFactory
-
unwrap
@Nullable public static ForkJoinPool.ForkJoinWorkerThreadFactory unwrap(@Nullable ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory)
UnwrapDisableInheritableForkJoinWorkerThreadFactoryto the original/underneath one.- Since:
- 2.10.1
- See Also:
TtlUnwrap.unwrap(Object),DisableInheritableForkJoinWorkerThreadFactory
-
-