public class DefaultAttributeMap extends Object implements AttributeMap
AttributeMap
implementation which use simple synchronization per bucket to keep the memory overhead
as low as possible.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)
Returns true if and only if the given
Attribute exists in this AttributeMap . |
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
Attribute
exists in this AttributeMap
.hasAttr
in interface AttributeMap
Copyright © 2008–2019 The Netty Project. All rights reserved.