Class TtlExecutors

java.lang.Object
com.alibaba.ttl.threadpool.TtlExecutors

public final class TtlExecutors extends Object
Util methods for TTL wrapper of jdk executors.
  1. wrap/check/unwrap methods for TTL wrapper of jdk executors(Executor, ExecutorService, ScheduledExecutorService).
  2. wrap/check/unwrap methods for disable Inheritable wrapper of ThreadFactory.
  3. wrap/check/unwrap methods for TtlRunnableUnwrapComparator wrapper of PriorityBlockingQueue.

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.
  • skip wrap/decoration thread pool/executor(aka. just return input executor) when ttl agent is loaded, Or when input executor is already wrapped/decorated.
Since:
0.9.0
Author:
Jerry Lee (oldratlee at gmail dot com)
See Also: