Package com.alibaba.ttl
package com.alibaba.ttl
TTL API.
- Author:
- Jerry Lee (oldratlee at gmail dot com)
- See Also:
-
ClassDescription
TransmittableThreadLocal(TTL) can transmit the value from the thread of submitting task to the thread of executing task even using thread pooling components.Transmittertransmit allTransmittableThreadLocaland registeredThreadLocalvalues of the current thread to other thread.The transmittee is the extension point for otherThreadLocals which are registered byregisterTransmitteemethod.TtlCallable<V>TtlCallabledecorateCallableto getTransmittableThreadLocalvalue and transmit it to the time ofCallableexecution, needed when useCallableto thread pool.TtlCopier<T>TtlCopiercopies the value whenTransmitter#capture(), use the copied value whenTransmitter#replay(Object).A recursive resultlessForkJoinTaskenhanced byTransmittableThreadLocal.A recursive result-bearingForkJoinTaskenhanced byTransmittableThreadLocal.TtlRunnabledecorateRunnableto getTransmittableThreadLocalvalue and transmit it to the time ofRunnableexecution, needed when useRunnableto thread pool.Deprecated.Util methods for TTL Wrapper: unwrap TTL Wrapper and check TTL Wrapper.Util methods for TTL Wrapper: wrap commonFunctional Interface.
TtlRunnable,ScheduledExecutorServiceinstead ofTimer,TimerTask.