本文整理了Java中org.apache.brooklyn.core.entity.Entities.destroyAllCatching()
方法的一些代码示例,展示了Entities.destroyAllCatching()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entities.destroyAllCatching()
方法的具体详情如下:
包路径:org.apache.brooklyn.core.entity.Entities
类名称:Entities
方法名:destroyAllCatching
[英]Same as #destroyAll(ManagementContext) but catching all errors
[中]与#destroyAll(管理上下文)相同,但捕获所有错误
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
@AfterMethod(alwaysRun=true)
private void tearDown() {
if (mgmt != null) {
Entities.destroyAllCatching(mgmt);
mgmt = null;
}
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-locations-jclouds
@AfterMethod(alwaysRun=true)
public void tearDown() {
List<Exception> exceptions = Lists.newArrayList();
for (SshMachineLocation machine : machines) {
try {
loc.release(machine);
} catch (Exception e) {
LOG.warn("Error releasing {}: {}; continuing...", machine, e.getMessage());
exceptions.add(e);
}
}
if (!exceptions.isEmpty()) {
LOG.info("Exception during tearDown: {}", Exceptions.collapseText(exceptions.get(0)));
}
machines.clear();
if (ctx != null) {
Entities.destroyAllCatching(ctx);
ctx = null;
}
}
内容来源于网络,如有侵权,请联系作者删除!