[Netty 5] ByteBuf should be an interface
See original GitHub issueByteBuf
is currently an abstract class with no state. CompositeByteBuf
is a concrete class and could be made to have no state. Before java 1.8 this allowed for evolving the interface over time, but java 1.8 provides support for default methods on interfaces. Having both of these classes be interfaces would make it easier to mock/wrap these classes and ensure all required methods are being implemented.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
New and noteworthy in 5.0 - Netty.docs
New Buffer API replaces ByteBuf · Aliasing is no longer allowed. · Reference counting is effectively gone. · The send method and Send...
Read more >Chapter 5. ByteBuf - Netty in Action - liveBook · Manning
Interface ByteBufHolder. We often find that we need to store a variety of property values in addition to the actual data payload. An...
Read more >Found class io.netty.buffer.ByteBuf, but interface was expected
It is a runtime exception telling you that the code found at runtime is fundamentally different from the code that was provided at...
Read more >netty-buffer 5.0.0.Alpha2 javadoc (io.netty)
You can also extend or wrap existing buffer type to add convenient accessors. The custom buffer type still implements ByteBuf interface rather than ......
Read more >NettyDataBuffer (Spring Framework 6.0.2 API)
Implementation of the DataBuffer interface that wraps a Netty 4 ByteBuf . Typically constructed with NettyDataBufferFactory . Since: 5.0; Author: Arjen ...
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
Also need to verify that performance doesn’t suffer from using
invokeinterface
instead ofinvokevirtual
.yeah, it was an interface before and the reason one of you changed it to be abstract class was performance…