public InvocationPlugin(NodeEngineImpl nodeEngine) {
   super(nodeEngine.getLogger(PendingInvocationsPlugin.class));
   InternalOperationService operationService = nodeEngine.getOperationService();
   this.invocationRegistry = ((OperationServiceImpl) operationService).getInvocationRegistry();
   HazelcastProperties props = nodeEngine.getProperties();
   this.samplePeriodMillis = props.getMillis(SAMPLE_PERIOD_SECONDS);
   this.thresholdMillis = props.getMillis(SLOW_THRESHOLD_SECONDS);
 }
  public void start() {
    logger.finest("Starting OperationService");

    ManagedExecutorService asyncExecutor =
        nodeEngine
            .getExecutionService()
            .register(
                ExecutionService.ASYNC_EXECUTOR,
                Runtime.getRuntime().availableProcessors(),
                ASYNC_QUEUE_CAPACITY,
                ExecutorType.CONCRETE);

    this.invocationContext =
        new Invocation.Context(
            asyncExecutor,
            nodeEngine.getClusterService().getClusterClock(),
            nodeEngine.getClusterService(),
            node.connectionManager,
            node.nodeEngine.getExecutionService(),
            nodeEngine.getProperties().getMillis(OPERATION_CALL_TIMEOUT_MILLIS),
            invocationRegistry,
            invocationMonitor,
            nodeEngine.getLocalMember().getUuid(),
            nodeEngine.getLogger(Invocation.class),
            node,
            nodeEngine,
            nodeEngine.getPartitionService(),
            this,
            operationExecutor,
            retryCount,
            serializationService,
            nodeEngine.getThisAddress());

    invocationMonitor.start();
    operationExecutor.start();
    asyncResponseHandler.start();
    slowOperationDetector.start();
  }