public int executeTask ( final TransactionalProtocolClient . TransactionalOperationListener < ServerOperation > listener , final ServerUpdateTask task ) { try { return execute ( listener , task . getServerIdentity ( ) , task . getOperation ( ) ) ; } catch ( OperationFailedException e ) { // Handle failures operation transformation failures final ServerIdentity identity = task . getServerIdentity ( ) ; final ServerOperation serverOperation = new ServerOperation ( identity , task . getOperation ( ) , null , null , OperationResultTransformer . ORIGINAL_RESULT ) ; final TransactionalProtocolClient . PreparedOperation < ServerOperation > result = BlockingQueueOperationListener . FailedOperation . create ( serverOperation , e ) ; listener . operationPrepared ( result ) ; recordExecutedRequest ( new ExecutedServerRequest ( identity , result . getFinalResult ( ) , OperationResultTransformer . ORIGINAL_RESULT ) ) ; return 1 ; // 1 ms timeout since there is no reason to wait for the locally stored result } }
Execute a server task .