public < V > V attachIfAbsent ( final AttachmentKey < V > key , final V value ) { assert key != null ; return key . cast ( contextAttachments . putIfAbsent ( key , value ) ) ; }
Attaches an arbitrary object to this context only if the object was not already attached . If a value has already been attached with the key provided the current value associated with the key is returned .