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.
@FunctionalInterface public interface TtlCopier<T>
TtlCopier creates the value whenTransmittableThreadLocal.Transmitter.capture(), use the created value whenTransmittableThreadLocal.Transmitter.replay(Object)- Since:
- 2.11.0
- Author:
- Jerry Lee (oldratlee at gmail dot com)
- See Also:
TransmittableThreadLocal.Transmitter,TransmittableThreadLocal.Transmitter.capture()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tcopy(T parentValue)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.
-
-
-
Method Detail
-
copy
T copy(T parentValue)
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 whenTransmittableThreadLocal.Transmitter.capture()).
-
-