question: public < T > CompletableFuture < T > apply ( long index ) { if ( index > lastApplied + 1 ) { applyAll ( index - 1 ) ; } try ( Entry entry = log . get ( index ) ) { if ( entry != null ) { return apply ( entry ) ; } else { return CompletableFuture . completedFuture ( null ) ; } } finally { setLastApplied ( index ) ; } }
target:  Applies the entry at the given index to the state machine. <p> Calls to this method are assumed to expect a result. This means linearizable session events triggered by the application of the command at the given index will be awaited before completing the returned future.