On Nov 11, 2010, at 5:21 PM, Daniel John Debrunner <[email protected]> wrote:
> On 11/11/2010 16:59, Kathey Marsden wrote: >> On 11/11/2010 11:27 AM, Mike Matrigali wrote: >> [snip good summary of support limitations] >>> I did not see anyway that a java program could find out if the >>> required syncing was being enforced. >>> >> Would it be reasonable to request such an API call in some future java >> version or would it just simply be impossible to implement? > > Actually there already is, the FileDescriptor.sync() call has this in its > defined contract: > > SyncFailedException - Thrown when the buffers cannot be flushed, or because > the system cannot guarantee that all the buffers have been synchronized with > physical media. > > The problem maybe that the JVMs just do not implement this according to the > spec. It also maybe true that a VM has no way of knowing if it could > guarantee a sync, thus in reality it would throw SyncFailedException all the > time ... > Is there any issue fire against the unexpected behavior based on spec?
