Called with a specific EvaluatorStatus that must be delivered to the driver.
554428
public synchronized void sendEvaluatorStatus(
      final ReefServiceProtos.EvaluatorStatusProto evaluatorStatusProto) {
    this.sendHeartBeat(EvaluatorRuntimeProtocol.EvaluatorHeartbeatProto.newBuilder()
        .setTimestamp(System.currentTimeMillis())
        .setEvaluatorStatus(evaluatorStatusProto)
        .build());
  }
640459
private void checkDriverSupport(final Connection connection) throws SQLException
   {
      if (!isValidChecked) {
         checkValidationSupport(connection);
         checkDefaultIsolation(connection);

         isValidChecked = true;
      }
   }
133810
def on_delivery(err, msg, obj):
    
    if err is not None:
        print('Message {} delivery failed for user {} with error {}'.format(
            obj.id, obj.name, err))
    else:
        print('Message {} successfully produced to {} [{}] at offset {}'.format(
            obj.id, msg.topic(), msg.partition(), msg.offset()))
913697
public function deliveryExecutions()
    {
        $dataTable = new DeliveriesMonitorDatatable($this->getCurrentDelivery(), $this->getRequest());
        $this->getServiceManager()->propagate($dataTable);
        $this->returnJson($dataTable);
    }
375556
private void evaluateState()
    {
        synchronized (this.callList)
        {
            // Get the highest prioirty state from the set of calls.
            PeerState newState = PeerState.NOTSET;
            for (CallTracker call : this.callList)
            {
                if (call.getState().getPriority() > newState.getPriority())
                    newState = call.getState();
            }

            this._state = newState;
        }
    }
1048418
def assumed_state(self):
        # pylint: disable=protected-access
        """"""
        return (not self._controller.car_online[self.id()] and
                (self._controller._last_update_time[self.id()] -
                 self._controller._last_wake_up_time[self.id()] >
                 self._controller.update_interval))
728819
private CompletionStage<AggregatedHttpMessage> updateHealthStatus(
            ServiceRequestContext ctx, HttpRequest req) {
        return mode(ctx, req).thenApply(mode -> {
            if (!mode.isPresent()) {
                return BAD_REQUEST_RES;
            }

            final boolean isHealthy = mode.get();

            serverHealth.setHealthy(isHealthy);

            return isHealthy ? TURN_ON_RES : TURN_OFF_RES;
        });
    }
1119251
private void deliver() {
    // We can have reentrancy here when using a direct executor, triggered by calls to
    // request more messages. This is safe as we simply loop until pendingDelivers = 0
    if (inDelivery) {
      return;
    }
    inDelivery = true;
    try {
      // Process the uncompressed bytes.
      while (!stopDelivery && pendingDeliveries > 0 && readRequiredBytes()) {
        switch (state) {
          case HEADER:
            processHeader();
            break;
          case BODY:
            // Read the body and deliver the message.
            processBody();

            // Since we've delivered a message, decrement the number of pending
            // deliveries remaining.
            pendingDeliveries--;
            break;
          default:
            throw new AssertionError("Invalid state: " + state);
        }
      }

      if (stopDelivery) {
        close();
        return;
      }

      /*
       * We are stalled when there are no more bytes to process. This allows delivering errors as
       * soon as the buffered input has been consumed, independent of whether the application
       * has requested another message.  At this point in the function, either all frames have been
       * delivered, or unprocessed is empty.  If there is a partial message, it will be inside next
       * frame and not in unprocessed.  If there is extra data but no pending deliveries, it will
       * be in unprocessed.
       */
      if (closeWhenComplete && isStalled()) {
        close();
      }
    } finally {
      inDelivery = false;
    }
  }
1303100
private void processSendWork() {
        if (this.sendLink == null || this.sendLink.getLocalState() == EndpointState.CLOSED || this.sendLink.getRemoteState() == EndpointState.CLOSED) {
            if (!this.getIsClosingOrClosed()) {
                this.recreateSendLink();
            }

            return;
        }

        while (this.sendLink.getLocalState() == EndpointState.ACTIVE && this.sendLink.getRemoteState() == EndpointState.ACTIVE
                && this.sendLink.getCredit() > 0) {
            final WeightedDeliveryTag weightedDelivery;
            final ReplayableWorkItem<Void> sendData;
            final String deliveryTag;
            synchronized (this.pendingSendLock) {
                weightedDelivery = this.pendingSends.poll();
                if (weightedDelivery != null) {
                    deliveryTag = weightedDelivery.getDeliveryTag();
                    sendData = this.pendingSendsData.get(deliveryTag);
                } else {
                    sendData = null;
                    deliveryTag = null;
                }
            }

            if (sendData != null) {
                if (sendData.getWork() != null && sendData.getWork().isDone()) {
                    // CoreSend could enque Sends into PendingSends Queue and can fail the SendCompletableFuture
                    // (when It fails to schedule the ProcessSendWork on reactor Thread)
                    this.pendingSendsData.remove(deliveryTag);
                    continue;
                }

                Delivery delivery = null;
                boolean linkAdvance = false;
                int sentMsgSize = 0;
                Exception sendException = null;

                try {
                    delivery = this.sendLink.delivery(deliveryTag.getBytes(UTF_8));
                    delivery.setMessageFormat(sendData.getMessageFormat());

                    sentMsgSize = this.sendLink.send(sendData.getMessage(), 0, sendData.getEncodedMessageSize());
                    assert sentMsgSize == sendData.getEncodedMessageSize() : "Contract of the ProtonJ library for Sender.Send API changed";

                    linkAdvance = this.sendLink.advance();
                } catch (Exception exception) {
                    sendException = exception;
                }

                if (linkAdvance) {
                    sendData.setWaitingForAck();
                } else {
                    if (TRACE_LOGGER.isDebugEnabled()) {
                        TRACE_LOGGER.debug(
                                String.format(Locale.US, "clientId[%s], path[%s], linkName[%s], deliveryTag[%s], sentMessageSize[%s], payloadActualSize[%s] - sendlink advance failed",
                                        this.getClientId(), this.sendPath, this.getSendLinkName(), deliveryTag, sentMsgSize, sendData.getEncodedMessageSize()));
                    }

                    if (delivery != null) {
                        delivery.free();
                    }

                    sendData.getWork().completeExceptionally(sendException != null
                            ? new OperationCancelledException(String.format(Locale.US,
                            "Entity(%s): send operation failed. Please see cause for more details", this.sendPath), sendException)
                            : new OperationCancelledException(
                            String.format(Locale.US, "Entity(%s): send operation failed while advancing delivery(tag: %s).", this.sendPath, deliveryTag)));
                }
            } else {
                if (deliveryTag != null) {
                    if (TRACE_LOGGER.isDebugEnabled()) {
                        TRACE_LOGGER.debug(
                                String.format(Locale.US, "clientId[%s], path[%s], linkName[%s], deliveryTag[%s] - sendData not found for this delivery.",
                                        this.getClientId(), this.sendPath, this.getSendLinkName(), deliveryTag));
                    }
                }

                break;
            }
        }
    }
385349
def handleStatus(self, version, status, message):
        """"""

        self.status = status
        self.message = message
505286
public final void detailEvaluate() {
    final List<EvaluationMonitor<POSSample>> listeners = new LinkedList<EvaluationMonitor<POSSample>>();
    final POSTaggerFineGrainedReportListener detailedFListener = new POSTaggerFineGrainedReportListener(
        System.out);
    listeners.add(detailedFListener);
    final POSEvaluator evaluator = new POSEvaluator(this.posTagger,
        listeners.toArray(new POSTaggerEvaluationMonitor[listeners.size()]));
    try {
      evaluator.evaluate(this.testSamples);
    } catch (IOException e) {
      e.printStackTrace();
    }
    detailedFListener.writeReport();
  }
871675
private synchronized void requestEvaluators() {
    assert this.state == State.INIT;
    LOG.log(Level.INFO, "Schedule on {0} Evaluators.", this.numEvaluators);
    this.evaluatorRequestor.newRequest()
        .setMemory(128)
        .setNumberOfCores(1)
        .setNumber(this.numEvaluators)
        .submit();
    this.state = State.WAIT_EVALUATORS;
    this.expectCount = this.numEvaluators;
  }
1071234
def driver_status(name):  # noqa: E501
    
    if(not hasAccess()):
        return redirectUnauthorized()

    driver = LoadedDrivers.getDefaultDriver()
    body = {"name": str(driver.__class__.__name__)}
    body.update(driver.serialize())
    return Response(status=200, body=body)
1313217
def on_evaluate_request(self, py_db, request):
        '''
        
        '''
        # : :type arguments: EvaluateArguments
        arguments = request.arguments

        thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(
            arguments.frameId)

        self.api.request_exec_or_evaluate_json(
            py_db, request, thread_id)
119670
def get_driver_api_status(driver):  # noqa: E501
    
    response = errorIfUnauthorized(role='developer')
    if response:
        return response
    else:
        response = ApitaxResponse()

    driver: Driver = LoadedDrivers.getDriver(driver)
    response.body.add({"format": driver.getApiFormat()})
    response.body.add({"description": driver.getApiDescription()})
    response.body.add({"status": driver.getApiStatus()})
    response.body.add({"auth-type": driver.getApiAuthType()})

    endpoints = {}
    endpoints['base'] = driver.getApiBaseEndpoint()
    endpoints['catalog'] = driver.getApiCatalogEndpoint()
    endpoints['auth'] = driver.getApiAuthEndpoint()
    response.body.add({'endpoints': endpoints})

    options = {}
    options['authenticatable'] = driver.isApiAuthenticated()
    options['authentication-separate'] = driver.isApiAuthenticationSeparateRequest()
    options['cataloggable'] = driver.isApiCataloggable()
    options['tokenable'] = driver.isApiTokenable()
    response.body.add({'options': options})

    return Response(status=200, body=response.getResponseBody())
290228
@Override
  public void onNext(final RemoteMessage<EvaluatorShimProtocol.EvaluatorShimControlProto> remoteMessage) {
    final EvaluatorShimProtocol.EvaluatorShimCommand command = remoteMessage.getMessage().getCommand();
    switch (command) {
    case LAUNCH_EVALUATOR:
      LOG.log(Level.INFO, "Received a command to launch the Evaluator.");
      this.threadPool.submit(new Runnable() {
        @Override
        public void run() {
          EvaluatorShim.this.onEvaluatorLaunch(remoteMessage.getMessage().getEvaluatorLaunchCommand(),
              remoteMessage.getMessage().getEvaluatorConfigString(),
              remoteMessage.getMessage().getEvaluatorFileResourcesUrl());
        }
      });
      break;

    case TERMINATE:
      LOG.log(Level.INFO, "Received a command to terminate the EvaluatorShim.");
      this.threadPool.submit(new Runnable() {
        @Override
        public void run() {
          EvaluatorShim.this.onStop();
        }
      });
      break;

    default:
      LOG.log(Level.WARNING, "An unknown command was received by the EvaluatorShim: {0}.", command);
      throw new IllegalArgumentException("An unknown command was received by the EvaluatorShim.");
    }
  }
287120
private synchronized void onNewContext(final ContextStatusPOJO contextStatus,
                                         final boolean notifyClientOnNewActiveContext) {
    final String contextID = contextStatus.getContextId();
    LOG.log(Level.FINE, "Adding new context {0}.", contextID);

    final Optional<String> parentID = contextStatus.hasParentId() ?
        Optional.of(contextStatus.getParentId()) : Optional.<String>empty();
    final EvaluatorContext context = contextFactory.newContext(contextID, parentID);
    this.addContext(context);
    if (notifyClientOnNewActiveContext) {
      if (driverRestartManager.getEvaluatorRestartState(context.getEvaluatorId())
          == EvaluatorRestartState.REREGISTERED) {
        // if restart, advance restart state and all the restart context active handlers.
        driverRestartManager.setEvaluatorProcessed(context.getEvaluatorId());
        this.messageDispatcher.onDriverRestartContextActive(context);
      }

      this.messageDispatcher.onContextActive(context);
    }
  }