java - Does FileDescriptor.sync() work for all file data or just file data originating within the callers JVM -
will ensure data synced on local machine or data originating within operation jvm?
fileoutputstream s = new fileoutputstream(filename) s.getfd().sync() fileinputstream fis = new fileinputstream(null); fis.getfd().sync(); context: have many programs (other software) write file share. lock when use it, , unlock after, ... finding os not synced file store (network drive) though done files.
even after lock acquired, seems os not fsycn'ed the file , of last data has not been written.
does filedescriptor.sync() work file data
no.
or file data originating within callers jvm
it works on current file descriptor only, within caller's jvm, along data writing.
Comments
Post a Comment