本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.emptyTopologyException方法的典型用法代码示例。如果您正苦于以下问题:Java U.emptyTopologyException方法的具体用法?Java U.emptyTopologyException怎么用?Java U.emptyTopologyException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.internal.util.typedef.internal.U
的用法示例。
在下文中一共展示了U.emptyTopologyException方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: broadcast
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* @param job Job closure.
* @param arg Optional job argument.
* @param nodes Grid nodes.
* @param execName Custom executor name.
* @return Grid future for execution result.
*/
public <T, R> IgniteInternalFuture<Collection<R>> broadcast(IgniteClosure<T, R> job, @Nullable T arg,
@Nullable Collection<ClusterNode> nodes, @Nullable String execName) {
busyLock.readLock();
try {
if (F.isEmpty(nodes))
return new GridFinishedFuture<>(U.emptyTopologyException());
ctx.task().setThreadContext(TC_SUBGRID, nodes);
return ctx.task().execute(new T11<>(job), arg, false, execName);
}
finally {
busyLock.readUnlock();
}
}
示例2: send0
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* Implementation of send.
* @param topic Topic.
* @param msg Message.
* @param async Async flag.
* @throws IgniteException On error.
*/
private void send0(@Nullable Object topic, Object msg, boolean async) throws IgniteException {
A.notNull(msg, "msg");
guard();
try {
Collection<ClusterNode> snapshot = prj.nodes();
if (snapshot.isEmpty())
throw U.emptyTopologyException();
ctx.io().sendUserMessage(snapshot, msg, topic, false, 0, async);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
}
finally {
unguard();
}
}
示例3: sendOrdered
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void sendOrdered(@Nullable Object topic, Object msg, long timeout) {
A.notNull(msg, "msg");
guard();
try {
Collection<ClusterNode> snapshot = prj.nodes();
if (snapshot.isEmpty())
throw U.emptyTopologyException();
if (timeout == 0)
timeout = ctx.config().getNetworkTimeout();
ctx.io().sendUserMessage(snapshot, msg, topic, true, timeout, false);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
}
finally {
unguard();
}
}