public class DefaultAttributeMap extends java.lang.Object implements AttributeMap
AttributeMap实现,它使用每个桶的简单同步来尽可能降低内存开销。
| Constructor and Description |
|---|
DefaultAttributeMap() |
| Modifier and Type | Method and Description |
|---|---|
<T> Attribute<T> |
attr(AttributeKey<T> key)
获取 Attribute对于给定AttributeKey 。
|
<T> boolean |
hasAttr(AttributeKey<T> key)
返回true当且仅当给定 Attribute存在于这个AttributeMap 。
|
public <T> Attribute<T> attr(AttributeKey<T> key)
AttributeMap
Attribute对于给定AttributeKey 。
此方法永远不会返回null,但可能会返回尚未设置值的Attribute 。
attr在界面
AttributeMap
public <T> boolean hasAttr(AttributeKey<T> key)
AttributeMap
Attribute存在于这个AttributeMap 。
hasAttr在界面
AttributeMap
Copyright © 2008–2018 The Netty Project. All rights reserved.