[
https://issues.apache.org/jira/browse/PROTON-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16629326#comment-16629326
]
ASF subversion and git services commented on PROTON-1941:
---------------------------------------------------------
Commit 34fcb2d436787798d4a7eca812b77bf3c2fe700d in qpid-proton-j's branch
refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton-j.git;h=34fcb2d ]
PROTON-1941 Add ensureRemaining to the WritableBuffer interface
Provide an access point for the codec to request that the WritableBuffer
be sized to accept a given number of bytes usually in relation to larger
incoming write of a complex type. Add default implementation to preseve
backwards compatability and an implementation in the ByteBuffer wrapper
that throws early if nont enough bytes exist to handle the announced
pending writes.
> Add WritableBuffer API for requesting space when writing complex types
> ----------------------------------------------------------------------
>
> Key: PROTON-1941
> URL: https://issues.apache.org/jira/browse/PROTON-1941
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-j
> Affects Versions: proton-j-0.29.0
> Reporter: Timothy Bish
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: proton-j-0.30.0
>
>
> Add new optional API to WritableBuffer that allows a complex types that has
> already computed the encoding size to request that the buffer have at least
> that amount of writable space left before an attempt to encode into that
> buffers occurs. This can result in either an early failure of the encode
> avoiding encoding when the result is bound to fail or the underlying buffer
> can increase its capacity to accommodate the incoming writes before they
> happen which can result in less churn as a buffer tries to grow as the
> complex type gets encoded into it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]