question: @ Override public void commit ( ) { if ( writeCache != null ) { synchronized ( this ) { flushWriteCache ( ) ; } } super . commit ( ) ; }
target:  Need to override commit to ensure the writeCache is flushed prior to writing the root block. For the DiskOnlyStrategy flushing the writeCache also ensures the backing file is created if the file is temporary. Note that the internal call to flush the writeCache must be synchronized or concurrent writers to the cache will cause problems.