public class DefaultAttributeMap extends Object implements AttributeMap
AttributeMap
implementation which not exibit any blocking behaviour on attribute lookup while using a
copy-on-write approach on the modify path.O(logn)
time worst-case
complexity, hence attribute::set(null)
is to be preferred to remove
.Constructor and Description |
---|
DefaultAttributeMap() |
Modifier and Type | Method and Description |
---|---|
<T> Attribute<T> |
attr(AttributeKey<T> key)
Get the
Attribute for the given AttributeKey . |
<T> boolean |
hasAttr(AttributeKey<T> key)
|
public <T> Attribute<T> attr(AttributeKey<T> key)
AttributeMap
Attribute
for the given AttributeKey
. This method will never return null, but may return
an Attribute
which does not have a value set yet.attr
in interface AttributeMap
public <T> boolean hasAttr(AttributeKey<T> key)
AttributeMap
hasAttr
in interface AttributeMap
Copyright © 2008–2024 The Netty Project. All rights reserved.