private void afterDataFsync ( Result < Boolean > result , int position , FsyncType fsyncType , ArrayList < SegmentFsyncCallback > listeners ) { try { completeIndex ( position ) ; Result < Boolean > cont = result . then ( ( v , r ) -> afterIndexFsync ( r , fsyncType , listeners ) ) ; if ( fsyncType . isSchedule ( ) ) { _sOut . fsyncSchedule ( cont ) ; } else { _sOut . fsync ( cont ) ; } } catch ( Throwable e ) { result . fail ( e ) ; } }
Callback after the page data has been fynced so the index can be written .