本文整理了Java中org.zstack.core.asyncbatch.While.all()
方法的一些代码示例,展示了While.all()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。While.all()
方法的具体详情如下:
包路径:org.zstack.core.asyncbatch.While
类名称:While
方法名:all
暂无
代码示例来源:origin: zstackio/zstack
private void detachIpFromVmNicCascade(List<DetachIpAddressFromVmNicMsg> msgs, final Completion completion) {
if (msgs.isEmpty()) {
completion.success();
return;
}
new While<>(msgs).all((msg, compl) -> bus.send(msg, new CloudBusCallBack(compl) {
@Override
public void run(MessageReply reply) {
if (!reply.isSuccess()) {
logger.warn(String.format("failed to detach ip[uuid:%s] from vmNic [uuid:%s], %s." +
" However, detaching will go on", msg.getUsedIpUuid(), msg.getVmNicUuid(), reply.getError()));
}
compl.done();
}
})).run(new NoErrorCompletion(completion) {
@Override
public void done() {
completion.success();
}
});
}
代码示例来源:origin: zstackio/zstack
new While<>(msgs).all((msg, com) -> bus.send(msg, new CloudBusCallBack(com) {
@Override
public void run(MessageReply reply) {
代码示例来源:origin: zstackio/zstack
new While<>(msgs).all((msg, compl) -> bus.send(msg, new CloudBusCallBack(compl) {
@Override
public void run(MessageReply reply) {
代码示例来源:origin: zstackio/zstack
new While<>(msgs).all((msg, whileCompletion) -> {
bus.send(msg, new CloudBusCallBack(whileCompletion) {
@Override
代码示例来源:origin: zstackio/zstack
new While<>(msgs).all((msg, noErrorCompletion) -> {
bus.send(msg, new CloudBusCallBack(noErrorCompletion) {
@Override
代码示例来源:origin: zstackio/zstack
new While<>(msgs).all((msg, whileCompletion) -> {
bus.send(msg, new CloudBusCallBack(whileCompletion) {
@Override
代码示例来源:origin: zstackio/zstack
@Override
public void run(FlowTrigger trigger, Map data) {
ErrorCodeList errList = new ErrorCodeList();
new While<>(currentLeaf.getDescendants()).all((sp, whileCompletion) -> {
Optional<VolumeSnapshotDeletionProtector> protector = pluginRgty.getExtensionList(VolumeSnapshotDeletionProtector.class).stream().filter(p -> p.getPrimaryStorageType().equals(primaryStorageType))
.findFirst();
代码示例来源:origin: zstackio/zstack
new While<>(detachIsoFromVmInstanceMsgs).all((detachIsoFromVmInstanceMsg, completion) -> {
bus.send(detachIsoFromVmInstanceMsg, new CloudBusCallBack(completion) {
@Override
代码示例来源:origin: zstackio/zstack
ErrorCodeList errList = new ErrorCodeList();
new While<>(guestL3NetworkUuids).all((guestL3NetworkUuid, completion1) -> {
vipStruct.setPeerL3NetworkUuid(guestL3NetworkUuid);
代码示例来源:origin: zstackio/zstack
@Override
public void rollback(FlowRollback trigger, Map data) {
List<UsedIpInventory> allocatedIps = (List<UsedIpInventory>) data.get(VmAllocateNicForStartingVmFlow.class);
if (allocatedIps == null || allocatedIps.isEmpty()) {
trigger.rollback();
return;
}
new While<>(allocatedIps).all((ip, cmpl) -> {
ReturnIpMsg rmsg = new ReturnIpMsg();
rmsg.setL3NetworkUuid(ip.getL3NetworkUuid());
rmsg.setUsedIpUuid(ip.getUuid());
bus.makeTargetServiceIdByResourceUuid(rmsg, L3NetworkConstant.SERVICE_ID, ip.getL3NetworkUuid());
bus.send(rmsg, new CloudBusCallBack(cmpl) {
@Override
public void run(MessageReply reply) {
for (VmNicExtensionPoint ext : pluginRgty.getExtensionList(VmNicExtensionPoint.class)) {
ext.afterDelIpAddress(ip.getVmNicUuid(), ip.getUuid());
}
cmpl.done();
}
});
}).run(new NoErrorCompletion(trigger) {
@Override
public void done() {
trigger.rollback();
}
});
}
}
代码示例来源:origin: zstackio/zstack
new While<>(hostUuids).all((hostUuid, compl) -> {
mount(inv, hostUuid, new Completion(compl){
代码示例来源:origin: zstackio/zstack
new While<>(vteps).all((vtep, completion1) -> {
DeleteVtepMsg msg = new DeleteVtepMsg();
msg.setL2NetworkUuid(vtep.getPoolUuid());
代码示例来源:origin: zstackio/zstack
new While<>(vxlanUuids).all((uuid, completion1) -> {
PrepareL2NetworkOnHostMsg msg = new PrepareL2NetworkOnHostMsg();
msg.setL2NetworkUuid(uuid);
代码示例来源:origin: zstackio/zstack
.listValues();
new While<>(vteps).all((vtep, completion1) -> {
Set<String> peers = vteps.stream()
.map(v -> v.getVtepIp())
代码示例来源:origin: zstackio/zstack
new While<>(huuids).all((hostUuid, compl) -> {
RemountCmd cmd = new RemountCmd();
cmd.url = pinv.getUrl();
代码示例来源:origin: zstackio/zstack
private void handleDeletion(final CascadeAction action, final Completion completion) {
List<VtepInventory> vteps = vtepFromAction(action);
if (vteps == null) {
completion.success();
return;
}
new While<>(vteps).all((vtep, completion1) -> {
DeleteVtepMsg msg = new DeleteVtepMsg();
msg.setL2NetworkUuid(vtep.getPoolUuid());
msg.setVtepUuid(vtep.getUuid());
bus.makeTargetServiceIdByResourceUuid(msg, L2NetworkConstant.SERVICE_ID, msg.getL2NetworkUuid());
bus.send(msg, new CloudBusCallBack(completion1) {
@Override
public void run(MessageReply reply) {
if (!reply.isSuccess()) {
logger.warn(reply.getError().toString());
}
completion1.done();
}
});
}).run(new NoErrorCompletion(completion) {
@Override
public void done() {
completion.success();
}
});
}
代码示例来源:origin: zstackio/zstack
new While<>(uuids).all((uuid, completion) -> {
DeleteL2NetworkMsg dmsg = new DeleteL2NetworkMsg();
dmsg.setUuid(uuid);
代码示例来源:origin: zstackio/zstack
new While<>(nic.getUsedIps()).all((ip, comp) -> {
ReturnIpMsg msg = new ReturnIpMsg();
msg.setUsedIpUuid(ip.getUuid());
代码示例来源:origin: zstackio/zstack
ErrorCodeList errList = new ErrorCodeList();
new While<>(uuids).all((String uuid, WhileCompletion completion) -> {
DeleteL2NetworkMsg dmsg = new DeleteL2NetworkMsg();
dmsg.setUuid(uuid);
代码示例来源:origin: zstackio/zstack
.eq(HostVO_.clusterUuid, msg.getUuid())
.listValues();
new While<>(hostUuids).all((hostUuid, completion) -> {
UpdateHostOSMsg umsg = new UpdateHostOSMsg();
umsg.setUuid(hostUuid);
内容来源于网络,如有侵权,请联系作者删除!