public final class SdkThreadLocalsRegistry extends Object
Modifier and Type | Method and Description |
---|---|
static <T> ThreadLocal<T> |
register(ThreadLocal<T> threadLocal)
Registers
ThreadLocal objects in use by the AWS SDK so that their values can
be removed via the remove() method. |
static void |
remove() |
public static <T> ThreadLocal<T> register(ThreadLocal<T> threadLocal)
ThreadLocal
objects in use by the AWS SDK so that their values can
be removed via the remove()
method.
To avoid memory leaks and reduce contention this method should only be called when setting static final locations (for example finals in enums or static final fields).
threadLocal
- ThreadLocal to registerpublic static void remove()
Copyright © 2021. All rights reserved.