本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.wait方法的典型用法代码示例。如果您正苦于以下问题:Java U.wait方法的具体用法?Java U.wait怎么用?Java U.wait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.internal.util.typedef.internal.U
的用法示例。
在下文中一共展示了U.wait方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: awaitSingleMapUpdates
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* @return {@code False} if interrupted.
*/
private boolean awaitSingleMapUpdates() {
try {
synchronized (mux) {
while (pendingSingleUpdates > 0)
U.wait(mux);
}
return true;
}
catch (IgniteInterruptedCheckedException e) {
U.warn(log, "Failed to wait for partition map updates, thread was interrupted: " + e);
return false;
}
}
示例2: waitForExchangeFuture
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* @param resVer Version to wait for.
* @return {@code True} if node is stopping.
* @throws IgniteInterruptedCheckedException If interrupted.
*/
private boolean waitForExchangeFuture(AffinityTopologyVersion resVer) throws IgniteInterruptedCheckedException {
synchronized (this) {
while (!stop && lastFutVer.compareTo(resVer) < 0)
U.wait(this);
return stop;
}
}
示例3: await
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* Await for completion.
*
* @return {@code true} If initialization was completed successfully.
* @throws IgniteInterruptedCheckedException If thread was interrupted.
*/
public boolean await() throws IgniteInterruptedCheckedException {
if (!finished) {
synchronized (mux) {
while (!finished)
U.wait(mux);
}
}
return e == null;
}