[Netty 5] AttributeMap removal
See original GitHub issueWe want to remove the AttributeMap
and also the attr(...)
method from the Channel
/ ChannelHandlerContext
.
There are two possibilities for this:
- provide another way to map things to a
Channel
. How exactly this is done is not clear yet, but perhaps the extensibility improvements will allow for wrapping theChannel
, or state can be kept in aChannelHandler
. - Just don’t offer a replacement and have the user use stateful
ChannelHandler
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (18 by maintainers)
Top Results From Across the Web
Netty 5 Migration Guide
In the case of you using attributes you should directly use Channel which still extends AttributeMap . Channel.Unsafe removal. The Channel.Unsafe interface was ......
Read more >New and noteworthy in 5.0 - Netty.docs
In the case of you using attributes you should directly use Channel which still extends AttributeMap . ChannelPipeline.add*(EventExecutorGroup...) removed. In ...
Read more >Attribute (Netty API Reference (5.0.0.Alpha4))
Removes this attribute from the AttributeMap and returns the old value. ... Because of this special caution should be taken when you call...
Read more >Netty 5.0.0.Alpha3 released - Netty.news
ChannelHandlerContext does not extend AttributeMap anymore; Make half-closure a core-concept of Channel; Allow sending "custom" events in both ...
Read more >DefaultAttributeMap (Netty API Reference (5.0.0.Alpha4))
public class DefaultAttributeMap extends Object implements AttributeMap ... Attributes lookup and remove exibit O(logn) time worst-case complexity, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I find the ability to attach an arbitrary object to a
Channel
very useful in practice, especially when I do not wish to introduce tight coupling between handlers or when there’s stateful information that do not belong to any handlers. TheAttributeMap
API is somewhat ugly although it serves my needs well.@johnou I am not convinced that this is the right thing to use for every read. For every read you should store the state directly in the ChannelHandler IMHO.