private void queueOrScheduleRequestInternal(Service s, Operation op) { if (s.queueRequest(op)) { return; } Runnable r = () -> { OperationContext opCtx = extractAndApplyContext(op); try { s.handleRequest(op); } catch (Exception e) { handleUncaughtException(s, op, e); } finally { OperationContext.setFrom(opCtx); } }; this.executor.execute(r); }
@Override public FilterReturnCode processRequest(Operation op, OperationProcessingContext context) { context.setSuspendConsumer(o -> { this.service.getHost().run(() -> { this.service.handleRequest(op, OperationProcessingStage.EXECUTING_SERVICE_HANDLER); }); }); return FilterReturnCode.SUSPEND_PROCESSING; } }
@Override public FilterReturnCode processRequest(Operation op, OperationProcessingContext context) { context.setSuspendConsumer(o -> { this.service.getHost().run(() -> { this.service.handleRequest(op, OperationProcessingStage.EXECUTING_SERVICE_HANDLER); }); }); return FilterReturnCode.SUSPEND_PROCESSING; } }
indexQueryOperation, e); }); indexService.handleRequest(getState);
indexService.handleRequest(getOp);
return; indexService.handleRequest(getOp);
indexService.handleRequest(post);