private void sequenceCommand ( long sequence , ServerSessionContext session , CompletableFuture < Result > future , ThreadContext context ) { if ( ! log . isOpen ( ) ) { context . executor ( ) . execute ( ( ) -> future . completeExceptionally ( new IllegalStateException ( "log closed" ) ) ) ; return ; } Result result = session . getResult ( sequence ) ; if ( result == null ) { LOGGER . debug ( "Missing command result for {}:{}" , session . id ( ) , sequence ) ; } context . executor ( ) . execute ( ( ) -> future . complete ( result ) ) ; }
Sequences a command according to the command sequence number .