code: public <V> V attachIfAbsent(final AttachmentKey<V> key, final V value) {
          assert key != null;
          return key.cast(contextAttachments.putIfAbsent(key, value));
      }
docs: 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.
  
  @param key   they attachment key used to ensure uniqueness and used for retrieval of the value.
  @param value the value to store.
  @param <V>   the value type of the attachment.
  
  @return the previous value associated with the key or {@code null} if there was no previous value.