io.cattle.platform.eventing.model.Event.getTransitioning()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中io.cattle.platform.eventing.model.Event.getTransitioning()方法的一些代码示例,展示了Event.getTransitioning()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getTransitioning()方法的具体详情如下:
包路径:io.cattle.platform.eventing.model.Event
类名称:Event
方法名:getTransitioning

Event.getTransitioning介绍

暂无

代码示例

代码示例来源:origin: rancher/cattle

public static boolean isTransitioningEvent(Event event) {
  if (event == null || event.getTransitioning() == null || Event.TRANSITIONING_NO.equals(event.getTransitioning())) {
    return false;
  }
  return true;
}

代码示例来源:origin: rancher/cattle

public static void copyTransitioning(Event from, EventVO<?> to) {
    to.setTransitioning(from.getTransitioning());
    to.setTransitioningInternalMessage(from.getTransitioningInternalMessage());
    to.setTransitioningMessage(from.getTransitioningMessage());
    to.setTransitioningProgress(from.getTransitioningProgress());
  }
}

代码示例来源:origin: rancher/cattle

@SuppressWarnings("unchecked")
public EventVO(Event event, String replyTo) {
  this.replyTo = replyTo;
  this.id = event.getId();
  this.name = event.getName();
  this.previousIds = event.getPreviousIds();
  this.previousNames = event.getPreviousNames();
  this.data = (T) event.getData();
  this.time = event.getTime();
  this.publisher = event.getPublisher();
  this.resourceId = event.getResourceId();
  this.resourceType = event.getResourceType();
  this.transitioning = event.getTransitioning();
  this.transitioningMessage = event.getTransitioningMessage();
  this.transitioningInternalMessage = event.getTransitioningInternalMessage();
  this.transitioningProgress = event.getTransitioningProgress();
  this.context = event.getContext();
  this.timeoutMillis = event.getTimeoutMillis();
}

代码示例来源:origin: rancher/cattle

@Override
  public void progress(Event event) {
    if (event.getTransitioning() == null || Event.TRANSITIONING_NO.equals(event.getTransitioning())) {
      return;
    }
    EventVO<Object> reply = EventVO.reply(previousEvent);
    copyTransitioning(event, reply);
    eventService.publish(event);
  }
};

代码示例来源:origin: rancher/cattle

protected void processDone(WorkItem item) {
  inFlight.remove(item.key);
  List<WorkItem> requests = this.waiters.get(item.key);
  List<WorkItem> unsatifiedRequests = new ArrayList<>();
  Map<String, ItemVersion> applied = getApplied(item.client);
  for (WorkItem requestItem : requests) {
    if (item.t != null || Event.TRANSITIONING_ERROR.equals(item.response.getTransitioning()) ) {
      reply(requestItem, item.response, item.t);
    } else if (satisfies(false, requestItem.request, applied)) {
      reply(requestItem, item.response, null);
    } else {
      unsatifiedRequests.add(requestItem);
    }
  }
  if (unsatifiedRequests.size() == 0) {
    if (log.isTraceEnabled()) {
      log.info("\t\tKey [{}] is done", item.key);
    }
    waiters.remove(item.key);
  } else {
    if (log.isTraceEnabled()) {
      log.info("\t\tKey[{}] is not done, unsatisified [{}]", item.key, unsatifiedRequests.size());
    }
    waiters.put(item.key, unsatifiedRequests);
  }
}

相关文章