brooklyn.entity.basic.Entities.unmanage()方法的使用及代码示例

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

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

Entities.unmanage介绍

暂无

代码示例

代码示例来源:origin: io.brooklyn/brooklyn-software-webapp

@Override
public void discard() {
  Entities.unmanage(this);
}

代码示例来源:origin: io.brooklyn/brooklyn-core

protected void discardNode(Entity entity) {
  removeMember(entity);
  Entities.unmanage(entity);
}

代码示例来源:origin: io.brooklyn/brooklyn-core

protected void stopAndRemoveNode(Entity member) {
    removeMember(member);
    
    try {
      if (member instanceof Startable) {
        Task<?> task = member.invoke(Startable.STOP, Collections.<String,Object>emptyMap());
        try {
          task.get();
        } catch (Exception e) {
          throw Exceptions.propagate(e);
        }
      }
    } finally {
      Entities.unmanage(member);
    }
  }
}

代码示例来源:origin: io.brooklyn/brooklyn-core

/** stops, destroys, and unmanages the given entity -- does as many as are valid given the type and state */
public static void destroy(Entity e) {
  if (isManaged(e)) {
    if (e instanceof Startable) Entities.invokeEffector((EntityLocal)e, e, Startable.STOP).getUnchecked();
    if (e instanceof EntityInternal) ((EntityInternal)e).destroy();
    unmanage(e);
    log.debug("destroyed and unmanaged "+e+"; mgmt now "+
        (e.getApplicationId()==null ? "(no app)" : e.getApplication().getManagementContext())+" - managed? "+isManaged(e));
  } else {
    log.debug("skipping destroy of "+e+": not managed");
  }
}

代码示例来源:origin: io.brooklyn/brooklyn-core

/**
 * stops, destroys, and unmanages the given application -- and terminates the mangaement context;
 * does as many as are valid given the type and state
 * @deprecated since 0.6.0 use destroy(Application) if you DONT want to destroy the mgmt context,
 * or destroy(app.getManagementContext()) if you want to destory everything in the app's mgmt context
 */
@Deprecated
public static void destroyAll(Application app) {
  if (isManaged(app)) {
    ManagementContext managementContext = app.getManagementContext();
    if (app instanceof Startable) Entities.invokeEffector((EntityLocal)app, app, Startable.STOP).getUnchecked();
    if (app instanceof AbstractEntity) ((AbstractEntity)app).destroy();
    unmanage(app);
    if (managementContext instanceof ManagementContextInternal) ((ManagementContextInternal)managementContext).terminate();
  }
}

相关文章