Package com.alibaba.ttl
Interface TtlCopier<T>
- All Known Implementing Classes:
TransmittableThreadLocal
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
TtlCopier copies the value when Transmitter#capture(),
use the copied value when Transmitter#replay(Object).- Since:
- 2.11.0
- Author:
- Jerry Lee (oldratlee at gmail dot com)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionComputes the value forTransmittableThreadLocalor registeredThreadLocal(registered by methodTransmitter#registerThreadLocal) as a function of the source thread's value at the time the task Object is created.
-
Method Details
-
copy
Computes the value forTransmittableThreadLocalor registeredThreadLocal(registered by methodTransmitter#registerThreadLocal) as a function of the source thread's value at the time the task Object is created.This method is called from
TtlRunnableorTtlCallablewhen it create, before the task is started (aka. called whenTransmitter#capture()).
-