[
https://issues.apache.org/jira/browse/THRIFT-3432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15050247#comment-15050247
]
ASF GitHub Bot commented on THRIFT-3432:
----------------------------------------
Github user thomaslee commented on the pull request:
https://github.com/apache/thrift/pull/705#issuecomment-163522525
@nsuke how does this look? Ultimately did away with the setter entirely & I
think the API's a little cleaner for it.
In addition to applying your other feedback I added a convenience method
`clear()` which will probably prove useful for folks who might want to reuse
TByteBuffer transports (e.g. folks using long-lived direct buffers for Thrift
serialization). You can see an example in the tests.
> Add a TByteBuffer transport to the Java library
> -----------------------------------------------
>
> Key: THRIFT-3432
> URL: https://issues.apache.org/jira/browse/THRIFT-3432
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Library
> Affects Versions: 0.9.3
> Reporter: Tom Lee
> Priority: Minor
>
> A bounded alternative to TMemoryBuffer that uses java.nio.ByteBuffer under
> the hood.
> This is useful both to set sane constraints on maximum message size in a
> transport-agnostic manner but also because direct buffers can be used to
> serialize Thrift off-heap, avoiding allocations (thus reducing GC frequency
> and potentially live set size)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)