Encapsulates the extend during which a Context is held by an Storage implementation.
Encapsulates the extend during which a Context is held by an Storage implementation. Once a Scope is closed, the Context will be removed from the Storage that created the Scope.
Wrapper that implements an optimized ThreadLocal access pattern ideal for heavily used ThreadLocals.
Wrapper that implements an optimized ThreadLocal access pattern ideal for heavily used ThreadLocals. It is faster to use a mutable holder object and always perform ThreadLocal.get() and never use ThreadLocal.set(), because the value is more likely to be found in the ThreadLocalMap direct hash slot and avoid the slow path of ThreadLocalMap.getEntryAfterMiss().
Credit to @trask from the FastThreadLocal in glowroot. One small change is that we don't use an kamon-defined holder object as that would prevent class unloading.