π a missing Java std lib(simple & 0-dependency) for framework/middleware, provide an enhanced InheritableThreadLocal that transmits values between threads even using thread pooling components.
ClassCastException
from PriorityBlockingQueue
when use TTL Agent
v2.12.3
https://alibaba.github.io/transmittable-thread-local/apidocs/2.12.5/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.5</version>
</dependency>
[!CAUTION] Version
2.12.4
π¦ is Deprecated! use version2.12.5
οΌ instead.
TtlWrappers
wrapSupplier
, wrapConsumer
, wrapBiConsumer
, wrapFunction
and wrapBiFunction
CustomizedBlockingQueueWithTtlDemo
https://alibaba.github.io/transmittable-thread-local/apidocs/2.12.4/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.4</version>
</dependency>
[!CAUTION] Version
2.12.3
π¦ is Deprecated! use version2.12.5
οΌ instead.
TransmittableThreadLocal.withInitialAndCopier
static method, javadoc
PriorityBlockingQueue
with ThreadPoolExecutor
Avoid ClassCastException(TtlRunnable cannot be cast to Comparable)
problem for combination usage:
(issues #330 #290 #178 submitted by @outh0527 @KevinQian @wangchongya)
java.util.concurrent.PriorityBlockingQueue
for java.util.concurrent.ThreadPoolExecutor
TTL
: API or Agent(TtlExecutorTransformlet
)com.alibaba.ttl.threadpool.agent.internal.transformlet.impl.TtlPriorityBlockingQueueTransformlet
TtlExecutorServiceWithPriorityBlockingQueueDemo
ClassCircularityError
(issues #278 #234 submitted by @linfan @kun1988)https://alibaba.github.io/transmittable-thread-local/apidocs/2.12.3/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.3</version>
</dependency>
Support PriorityBlockingQueue
with ThreadPoolExecutor
.
Avoid ClassCastException(TtlRunnable cannot be cast to Comparable)
problem for combination usage:
java.util.concurrent.PriorityBlockingQueue
for java.util.concurrent.ThreadPoolExecutor ThreadPoolExecutor
TTL
: API or Agent(TtlExecutorTransformlet
)com.alibaba.ttl.threadpool.agent.internal.transformlet.impl.TtlPriorityBlockingQueueTransformlet
https://alibaba.github.io/transmittable-thread-local/apidocs/2.12.3-RC1/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.3-RC1</version>
</dependency>
TransmittableThreadLocal.withInitial
static method
ConcurrentModificationException
even adjust TTL instances in biz lifecycle callbacks
getDefaultDisableInheritable*ThreadFactory
annotation: @Nullable
-> @NonNull
https://alibaba.github.io/transmittable-thread-local/apidocs/2.12.2/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.2</version>
</dependency>
[!CAUTION] This is a deprecated BETA version, DO NOT useβοΈ The update content is NOT released in
v2.x
, and is developing onTTL v3
.
TTL Agent
extension Transformlet
π§©
TTL Agent
extension Transformlet
developmentagent
package for TTL Agent
extension Transformlet
development πJVM -D property
TtlAgent
getDefaultDisableInheritable*ThreadFactory
annotation: Nullable
-> NonNull
https://alibaba.github.io/transmittable-thread-local/apidocs/2.13.0-Beta1/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.13.0-Beta1</version>
</dependency>
TransmittableThreadLocal
β¨https://alibaba.github.io/transmittable-thread-local/apidocs/2.12.1/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.1</version>
</dependency>
TtlExecutors
support idempotency
Executors
can be cooperated with the usage of "Decorate Runnable
and Callable
". π€TtlRunnable/TtlCallable
to the wrapper Executor
; otherwise throw IllegalStateException
.javassist
shaded package:com.alibaba.ttl.internal.javassist
-> com.alibaba.ttl.threadpool.agent.internal.javassist
ForkJoinPoolDemo
and ParallelStreamDemo
/add TtlForkJoinTaskDemo
https://alibaba.github.io/transmittable-thread-local/apidocs/2.12.0/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.0</version>
</dependency>
v2.11.0
v2.11.0 ~ v2.11.4
, DO NOT use these versions, DO upgradeβΌοΈhttps://alibaba.github.io/transmittable-thread-local/apidocs/2.11.5/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.11.5</version>
</dependency>
[!CAUTION] Version
2.11.4
π¦ is Deprecated! use version2.11.5
οΌ instead.
https://alibaba.github.io/transmittable-thread-local/apidocs/2.11.4/index.html
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.11.4</version>
</dependency>