Class DefaultAttributeMap
java.lang.Object
io.netty.util.DefaultAttributeMap
- All Implemented Interfaces:
AttributeMap
- Direct Known Subclasses:
AbstractChannel
Default
Attributes lookup and remove exibit
AttributeMap implementation which not exibit any blocking behaviour on attribute lookup while using a
copy-on-write approach on the modify path.Attributes lookup and remove exibit
O(logn) time worst-case
complexity, hence attribute::set(null) is to be preferred to remove.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Attribute<T> attr(AttributeKey<T> key) Get theAttributefor the givenAttributeKey.<T> booleanhasAttr(AttributeKey<T> key)
-
Constructor Details
-
DefaultAttributeMap
public DefaultAttributeMap()
-
-
Method Details
-
attr
Description copied from interface:AttributeMapGet theAttributefor the givenAttributeKey. This method will never return null, but may return anAttributewhich does not have a value set yet.- Specified by:
attrin interfaceAttributeMap
-
hasAttr
Description copied from interface:AttributeMap- Specified by:
hasAttrin interfaceAttributeMap
-