private void handleThrottlingEnabledMessage(ThrottlingEnabledFeedMessage throttlingMessage) {
   FeedConnectionId connectionId = throttlingMessage.getConnectionId();
   FeedRuntimeManager runtimeManager =
       feedManager.getFeedConnectionManager().getFeedRuntimeManager(connectionId);
   Set<FeedRuntimeId> runtimes = runtimeManager.getFeedRuntimes();
   for (FeedRuntimeId runtimeId : runtimes) {
     if (runtimeId.getFeedRuntimeType().equals(FeedRuntimeType.STORE)) {
       FeedRuntime storeRuntime = runtimeManager.getFeedRuntime(runtimeId);
       ((StorageSideMonitoredBuffer) (storeRuntime.getInputHandler().getmBuffer()))
           .setAcking(false);
       if (LOGGER.isLoggable(Level.INFO)) {
         LOGGER.info(
             "Acking Disabled in view of throttling that has been activted upfron in the pipeline "
                 + connectionId);
       }
     }
   }
 }
 private void handlePrepareStallMessage(PrepareStallMessage prepareStallMessage)
     throws HyracksDataException {
   FeedConnectionId connectionId = prepareStallMessage.getConnectionId();
   int computePartitionsRetainLimit = prepareStallMessage.getComputePartitionsRetainLimit();
   FeedRuntimeManager runtimeManager =
       feedManager.getFeedConnectionManager().getFeedRuntimeManager(connectionId);
   Set<FeedRuntimeId> feedRuntimes = runtimeManager.getFeedRuntimes();
   for (FeedRuntimeId runtimeId : feedRuntimes) {
     FeedRuntime runtime = runtimeManager.getFeedRuntime(runtimeId);
     switch (runtimeId.getFeedRuntimeType()) {
       case COMPUTE:
         Mode requiredMode =
             runtimeId.getPartition() <= computePartitionsRetainLimit ? Mode.STALL : Mode.END;
         runtime.setMode(requiredMode);
         break;
       default:
         runtime.setMode(Mode.STALL);
         break;
     }
   }
 }
  private void handleFeedTupleCommitResponseMessage(
      FeedTupleCommitResponseMessage commitResponseMessage) {
    FeedConnectionId connectionId = commitResponseMessage.getConnectionId();
    FeedRuntimeManager runtimeManager =
        feedManager.getFeedConnectionManager().getFeedRuntimeManager(connectionId);
    Set<FeedRuntimeId> runtimes = runtimeManager.getFeedRuntimes();
    for (FeedRuntimeId runtimeId : runtimes) {
      FeedRuntime runtime = runtimeManager.getFeedRuntime(runtimeId);
      switch (runtimeId.getFeedRuntimeType()) {
        case COLLECT:
          FeedCollectRuntimeInputHandler inputHandler =
              (FeedCollectRuntimeInputHandler) runtime.getInputHandler();
          int maxBasePersisted = commitResponseMessage.getMaxWindowAcked();
          inputHandler.dropTill(IntakePartitionStatistics.ACK_WINDOW_SIZE * (maxBasePersisted + 1));
          break;
        case STORE:
          MonitoredBufferStorageTimerTask sTask =
              runtime.getInputHandler().getmBuffer().getStorageTimeTrackingRateTask();
          sTask.receiveCommitAckResponse(commitResponseMessage);
          break;
      }
    }

    commitResponseMessage.getIntakePartition();
    SubscribableFeedRuntimeId sid =
        new SubscribableFeedRuntimeId(connectionId.getFeedId(), FeedRuntimeType.INTAKE, partition);
    IngestionRuntime ingestionRuntime =
        (IngestionRuntime) feedManager.getFeedSubscriptionManager().getSubscribableRuntime(sid);
    if (ingestionRuntime != null) {
      IIntakeProgressTracker tracker =
          ingestionRuntime.getAdapterRuntimeManager().getProgressTracker();
      if (tracker != null) {
        tracker.notifyIngestedTupleTimestamp(System.currentTimeMillis());
      }
    }
  }