[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cassandra-dev
Subject:    Re: Question about ByteBuffer positions
From:       Nate McCall <nate () riptano ! com>
Date:       2010-11-24 0:10:12
Message-ID: AANLkTikkniLNzR-7Nspzgc7=b1ZCVRa=A+_eCxhuZ6nW () mail ! gmail ! com
[Download RAW message or body]

for your own code, I would stay with duplicate(), slice() and similar
and just assume we will do something fancier than we currently are one
day. The overhead of those methods is really small as it's just
pointers to the same underlying buffer.

On Tue, Nov 23, 2010 at 5:42 PM, Ed Anuff <ed@anuff.com> wrote:
> Is it safe to assume that anywhere that you're provided with a ByteBuffer
> that it's ok to leave it's position wherever you want or should you be
> calling buffer.duplicate() and working with your copy of the buffer?  I've
> tried to trace anything that calls the new method signatures in AbstractType
> and really couldn't tell.
>
> Ed
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic