/** * {@link #flushWriteCache() flushes} the {@link #writeCache} before syncing * the disk. */ public void force(final boolean metadata) { assertOpen(); synchronized(this) { // flush all pending writes to disk. flushWriteCache(); } try { if(!temporaryStore) { // sync the disk. getChannel().force(metadata); } } catch (IOException ex) { throw new RuntimeException(ex); } storeCounters.nforce++; }
/** * {@link #flushWriteCache() flushes} the {@link #writeCache} before syncing * the disk. */ public void force(final boolean metadata) { assertOpen(); synchronized(this) { // flush all pending writes to disk. flushWriteCache(); } try { if(!temporaryStore) { // sync the disk. getChannel().force(metadata); } } catch (IOException ex) { throw new RuntimeException(ex); } storeCounters.nforce++; }
FileChannelUtility.writeAll(getChannel(), data, pos);
FileChannelUtility.writeAll(getChannel(), data, pos);
storeCounters.ndiskWrite += FileChannelUtility.writeAll(getChannel(), data, pos);
storeCounters.ndiskWrite += FileChannelUtility.writeAll(getChannel(), data, pos);