本文整理了Java中org.apache.brooklyn.api.mgmt.EntityManager.unmanage()
方法的一些代码示例,展示了EntityManager.unmanage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EntityManager.unmanage()
方法的具体详情如下:
包路径:org.apache.brooklyn.api.mgmt.EntityManager
类名称:EntityManager
方法名:unmanage
[英]Causes the given entity and its children, recursively, to be removed from the management plane (for instance because the entity is no longer relevant)
[中]使给定实体及其子实体递归地从管理平面中移除(例如,因为该实体不再相关)
代码示例来源:origin: org.apache.brooklyn/brooklyn-rest-resources
@Override
public void run() {
((EntityInternal)application).destroy();
mgmt.getEntityManager().unmanage(application);
}
});
代码示例来源:origin: org.apache.brooklyn/brooklyn-rest-resources
@Override
public void run() {
if (release)
Entities.destroyCatching(entity);
else
mgmt.getEntityManager().unmanage(entity);
}
});
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
public static void unmanage(Entity entity) {
if (((EntityInternal)entity).getManagementSupport().isDeployed()) {
((EntityInternal)entity).getManagementContext().getEntityManager().unmanage(entity);
}
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
getEntityManager().unmanage(this);
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
@Test(groups="Broken")
public void testStartsThenChildFailsButWithQuorumCausesAppToSucceed() throws Exception {
TestApplication app = mgmt.getEntityManager().createEntity(EntitySpec.create(TestApplication.class)
.configure(StartableApplication.UP_QUORUM_CHECK, QuorumCheck.QuorumChecks.atLeastOne())
.configure(StartableApplication.RUNNING_QUORUM_CHECK, QuorumCheck.QuorumChecks.atLeastOne())
.child(EntitySpec.create(TestEntity.class))
.child(EntitySpec.create(TestEntity.class)));
TestEntity child = (TestEntity) Iterables.get(app.getChildren(), 0);
app.start(ImmutableList.<Location>of());
assertUpAndRunningEventually(app);
for (Entity childr : app.getChildren()) {
EntityAsserts.assertAttributeEquals(childr, TestEntity.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
}
ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator(child, "myIndicator", "Simulate not-up of child");
assertHealthContinually(app, Lifecycle.RUNNING, true);
mgmt.getEntityManager().unmanage(app);
}
内容来源于网络,如有侵权,请联系作者删除!