本文整理了Java中brooklyn.entity.basic.Entities.invokeEffectorWithArgs()
方法的一些代码示例,展示了Entities.invokeEffectorWithArgs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entities.invokeEffectorWithArgs()
方法的具体详情如下:
包路径:brooklyn.entity.basic.Entities
类名称:Entities
方法名:invokeEffectorWithArgs
暂无
代码示例来源:origin: io.brooklyn/brooklyn-core
@Override
public void start(Collection<? extends Location> locations) {
log.info("Starting entity "+this+" at "+locations);
// essentially does StartableMethods.start(this, locations),
// but optionally filters locations for each child
LocationsFilter filter = getConfig(LOCATIONS_FILTER);
Iterable<Entity> startables = filterStartableManagedEntities(getChildren());
if (startables == null || Iterables.isEmpty(startables)) return;
List<Task<?>> tasks = Lists.newArrayList();
for (final Entity entity : startables) {
Collection<? extends Location> l2 = locations;
if (filter!=null) {
l2 = filter.filterForContext(new ArrayList<Location>(locations), entity);
log.debug("Child "+entity+" of "+this+" being started in filtered location list: "+l2);
}
tasks.add( Entities.invokeEffectorWithArgs(this, entity, Startable.START, l2) );
}
for (Task<?> t: tasks) t.getUnchecked();
}
代码示例来源:origin: io.brooklyn/brooklyn-policy
@Override
public void run() {
try {
Entities.invokeEffectorWithArgs(entity, entity, DynamicCluster.REPLACE_MEMBER, event.getSource().getId()).get();
consecutiveReplacementFailureTimes.clear();
} catch (Exception e) {
// FIXME replaceMember fails if stop fails on the old node; should resolve that more gracefully than this
if (e.toString().contains("stopping") && e.toString().contains(event.getSource().getId())) {
LOG.info("ServiceReplacer: ignoring error reported from stopping failed node "+event.getSource());
return;
}
onReplacementFailed("Replace failure (error "+e+") at "+entity+": "+event.getValue());
}
}
内容来源于网络,如有侵权,请联系作者删除!