io.cattle.platform.core.model.Instance.getInstanceTriggeredStop()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(182)

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

Instance.getInstanceTriggeredStop介绍

[英]Getter for cattle.instance.instance_triggered_stop.
[中]cattle.instance.instance_triggered_stop的Getter。

代码示例

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

@Override
public HandlerResult handle(ProcessState state, ProcessInstance process) {
  Instance instance = (Instance) state.getResource();
  String chainProcess = null;
  boolean start = DataAccessor.fromMap(state.getData()).withScope(InstanceProcessOptions.class).withKey(InstanceProcessOptions.START).withDefault(false)
      .as(Boolean.class);
  if (start) {
    chainProcess = InstanceConstants.PROCESS_START;
  } else if (Boolean.TRUE.equals(state.getData().get(InstanceConstants.REMOVE_OPTION)) ||
      InstanceConstants.ON_STOP_REMOVE.equals(instance.getInstanceTriggeredStop())) {
    chainProcess = objectProcessManager.getStandardProcessName(StandardProcess.REMOVE, instance);
  }
  return new HandlerResult().withChainProcessName(chainProcess);
}

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

setHostname(from.getHostname());
setZoneId(from.getZoneId());
setInstanceTriggeredStop(from.getInstanceTriggeredStop());
setAgentId(from.getAgentId());
setDomain(from.getDomain());

相关文章