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

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

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

Entities.invokeEffectorList介绍

[英]Invokes an Effector on multiple entities, with the named arguments from the parameters Mapusing the context of the provided Entity.

Intended for use only from the callingEntity.

Returns a ParallelTask containing the results from each tasks invocation. Calling java.util.concurrent.Future#get() on this will block until all tasks are complete, and will throw an exception if any task resulted in an error.
[中]使用所提供实体的上下文,使用参数映射中的命名参数调用多个实体上的效应器。
仅供callingEntity使用。
返回包含每个任务调用结果的ParallelTask。调用java。util。同时发生的此操作的Future#get()将阻塞,直到所有任务完成,如果任何任务导致错误,则将引发异常。

代码示例

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

public static <T> Task<List<T>> invokeEffectorListWithMap(EntityLocal callingEntity, Iterable<? extends Entity> entitiesToCall,
    final Effector<T> effector, final Map<String,?> parameters) {
  return invokeEffectorList(callingEntity, entitiesToCall, effector, parameters);
}
@SuppressWarnings("unchecked")

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

public static <T> Task<List<T>> invokeEffectorList(EntityLocal callingEntity, Iterable<? extends Entity> entitiesToCall,
    final Effector<T> effector) {
  return invokeEffectorList(callingEntity, entitiesToCall, effector, Collections.<String,Object>emptyMap());
}

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

/** @deprecated since 0.6.0 use invokeEffector */ @Deprecated
public static <T> Task<List<T>> invokeEffectorWithMap(EntityLocal callingEntity, Entity entityToCall,
    final Effector<T> effector, final Map<String,?> parameters) {
  return invokeEffectorList(callingEntity, ImmutableList.of(entityToCall), effector, parameters);
}

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

/** convenience - invokes in parallel if multiple, but otherwise invokes the item directly */
public static Task<?> invokeEffector(EntityLocal callingEntity, Iterable<? extends Entity> entitiesToCall,
    final Effector<?> effector, final Map<String,?> parameters) {
  if (Iterables.size(entitiesToCall)==1)
    return invokeEffector(callingEntity, entitiesToCall.iterator().next(), effector, parameters);
  else
    return invokeEffectorList(callingEntity, entitiesToCall, effector, parameters);
}
/** convenience - invokes in parallel if multiple, but otherwise invokes the item directly */

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

Entities.invokeEffectorList(this, childrenToStart, Startable.START, ImmutableMap.of("locations", locations))
  .get();

相关文章