private void performNextWrite ( ) { Append append = getNextAppend ( ) ; if ( append == null ) { return ; } long traceId = LoggerHelpers . traceEnter ( log , "storeAppend" , append ) ; Timer timer = new Timer ( ) ; storeAppend ( append ) . whenComplete ( ( v , e ) -> { handleAppendResult ( append , e , timer ) ; LoggerHelpers . traceLeave ( log , "storeAppend" , traceId , v , e ) ; } ) . whenComplete ( ( v , e ) -> append . getData ( ) . release ( ) ) ; }
If there isn t already an append outstanding against the store write a new one . Appends are opportunistically batched here . i . e . If many are waiting they are combined into a single append and that is written .