RFR : 8221696: MappedByteBuffer.force method to specify range
Daniel Fuchs
daniel.fuchs at oracle.com
Tue Apr 9 15:04:19 UTC 2019
Hi Andrew,
On 09/04/2019 13:37, Andrew Dinn wrote:
> I am not sure that this needs to be mentioned in an implNote. It is of
> the nature of most memory-mapped storage devices that writeback has a
> minimum granularity well above byte level. Would you be ok with a
> correspondingly general caveat?
>
> For example, what if I changed the second paragraph in the commment to:
>
> * <p> If the file mapped into this buffer resides on a local
> * storage device then when this method returns it is guaranteed
> * that all changes made to the selected region of the buffer since
> * it was created, or since this method was last invoked, will have
> * been written to that device. The force operation is free to
> * write bytes that lie outside the specified region, for example
> * to ensure that data blocks of some device-specific granularity
> * are transferred in their entirety.
> *
>
That reads fine, thanks!
BTW: I haven't really looked at the implementation, I'm leaving that to
the experts of the field :-)
best regards,
-- daniel
More information about the nio-dev
mailing list