本文整理了Java中org.apache.brooklyn.core.entity.Entities.destroyCatching()
方法的一些代码示例,展示了Entities.destroyCatching()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entities.destroyCatching()
方法的具体详情如下:
包路径:org.apache.brooklyn.core.entity.Entities
类名称:Entities
方法名:destroyCatching
[英]Same as #destroy(Entity) but catching all errors.
[中]与#销毁(实体)相同,但捕获所有错误。
代码示例来源: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-policy
@Test
public void testResizeUp() throws Exception {
EntityAsserts.assertAttributeEqualsEventually(cluster, TestCluster.GROUP_SIZE, CLUSTER_INIITIAL_SIZE);
// Simulate user expunging the entities manually
for (int i = 0; i < CLUSTER_MAX_SIZE - CLUSTER_MIN_SIZE; i++) {
Entities.destroyCatching(cluster.getMembers().iterator().next());
}
EntityAsserts.assertAttributeEqualsEventually(cluster, TestSizeRecordingCluster.SIZE_HISTORY_RECORD_COUNT, 2);
Assert.assertEquals((int)cluster.getSizeHistory().get(0), CLUSTER_INIITIAL_SIZE);
Assert.assertEquals((int)cluster.getSizeHistory().get(1), CLUSTER_MIN_SIZE);
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
destroyCatching(loc);
代码示例来源:origin: org.apache.brooklyn/brooklyn-software-base
Entities.destroyCatching(app);
LOG.info("Time for expunging: {}", Duration.of(stopwatch));
内容来源于网络,如有侵权,请联系作者删除!