ThreadLocalRdContext

abstract class ThreadLocalRdContext<T : Any>(key: String, heavy: Boolean, serializer: IMarshaller<T>) : RdContext<T>

Describes an RdContext which uses ThreadLocal as internal storage for values

Constructors

Link copied to clipboard
constructor(key: String, heavy: Boolean, serializer: IMarshaller<T>)

Properties

Link copied to clipboard
Link copied to clipboard
val key: String
Link copied to clipboard
Link copied to clipboard
open override val value: T?

The current value for this context implemented as thread-local storage

Link copied to clipboard

Value which is used as a key inside per-context entities like RdPerContextMap

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun updateValue(newValue: T?): AutoCloseable

Changes current value to newValue and returns a cookie which should restore old value on closing