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.Transmitter
transmit allTransmittableThreadLocal
and registeredThreadLocal
values of the current thread to other thread.The transmittee is the extension point for otherThreadLocal
s which are registered byregisterTransmittee
method.TtlCallable<V>TtlCallable
decorateCallable
to getTransmittableThreadLocal
value and transmit it to the time ofCallable
execution, needed when useCallable
to thread pool.TtlCopier<T>TtlCopier
copies the value whenTransmitter#capture()
, use the copied value whenTransmitter#replay(Object)
.A recursive resultlessForkJoinTask
enhanced byTransmittableThreadLocal
.A recursive result-bearingForkJoinTask
enhanced byTransmittableThreadLocal
.TtlRunnable
decorateRunnable
to getTransmittableThreadLocal
value and transmit it to the time ofRunnable
execution, needed when useRunnable
to thread pool.Deprecated.Util methods for TTL Wrapper: unwrap TTL Wrapper and check TTL Wrapper.Util methods for TTL Wrapper: wrap commonFunctional Interface
.
TtlRunnable
,ScheduledExecutorService
instead ofTimer
,TimerTask
.