[
https://issues.apache.org/jira/browse/DIRECTMEMORY-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223171#comment-13223171
]
Simone Tripodi commented on DIRECTMEMORY-69:
--------------------------------------------
Looks *really* interesting, thanks a lot for putting efforts on this!!!
I just have few observations:
* deprecated methods can be safety dropped - no risk to break binary
compatibility since we haven't released DM yet as ASF;
* while {{OffHeapStream}}, {{OffHeapInputStream}} and {{OffHeapOutputStream}}
are public, IMHO their constructors should be visible only inside their
packages - unless the wished behavior is letting users instantiate them (IIUC
what the purpose of this classes is, I wouldn't recommend that behavior)
* In snippets like
{code}
+ if ( currentPointerIndex > 0 && currentPointerIndex <= pointers.size()
)
+ {
+ return pointers.get( currentPointerIndex - 1 );
+ }
+ else
+ {
+ return null;
+ }
{code}
the {{else}} branch can be dropped, it can be modified as
{code}
+ if ( currentPointerIndex > 0 && currentPointerIndex <= pointers.size()
)
+ {
+ return pointers.get( currentPointerIndex - 1 );
+ }
+ return null;
{code}
great work, congrats!
> Expose InputStream and OutputStream Interfaces instead of internal
> Pointer.directBuffer
> ---------------------------------------------------------------------------------------
>
> Key: DIRECTMEMORY-69
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-69
> Project: Apache DirectMemory
> Issue Type: Improvement
> Reporter: Benoit Perroud
> Assignee: Benoit Perroud
> Attachments: DIRECTMEMORY-69-in-and-out-streams.patch
>
>
> Providing an InputStream and OutputStream interface would be a clean way to
> reconciliate both DIRECTMEMORY-37 and DIRECTMEMORY-64 ?
> Allocation of more space would be done in the backend, no need to predefine a
> size.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira