@Override public void fail(ErrorCode errorCode) { BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply reply = new BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply(); reply.setError(errorCode); bus.reply(msg, reply); } });
@Override public void success(String bsPath) { BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply reply = new BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply(); reply.setBackupStorageInstallPath(bsPath); completion.success(reply); }
@Override public void fail(ErrorCode errorCode) { reply.setError(errorCode); bus.reply(msg, reply); } });
private void handle(final BackupVolumeSnapshotFromPrimaryStorageToBackupStorageMsg msg) { BackupStorageInventory bs = msg.getBackupStorage(); VolumeSnapshotInventory sinv = msg.getSnapshot(); NfsPrimaryToBackupStorageMediator mediator = factory.getPrimaryToBackupStorageMediator( BackupStorageType.valueOf(bs.getType()), nfsMgr.findHypervisorTypeByImageFormatAndPrimaryStorageUuid(sinv.getFormat(), self.getUuid()) ); final BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply reply = new BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply(); final String installPath = mediator.makeVolumeSnapshotInstallPath(bs.getUuid(), sinv.getUuid()); mediator.uploadBits(null, getSelfInventory(), bs, installPath, sinv.getPrimaryStorageInstallPath(), new ReturnValueCompletion<String>(msg) { @Override public void success(String installPath) { reply.setBackupStorageInstallPath(installPath); bus.reply(msg, reply); } @Override public void fail(ErrorCode errorCode) { reply.setError(errorCode); bus.reply(msg, reply); } }); }
@Override public void success(String installPath) { reply.setBackupStorageInstallPath(installPath); bus.reply(msg, reply); }
@Override public void run(MessageReply rsp) { if (!rsp.isSuccess()) { reply.setError(rsp.getError()); } else { BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply r = rsp.castReply(); VolumeSnapshotBackupStorageRefVO ref = new VolumeSnapshotBackupStorageRefVO(); ref.setInstallPath(r.getBackupStorageInstallPath()); ref.setVolumeSnapshotUuid(self.getUuid()); ref.setBackupStorageUuid(msg.getBackupStorage().getUuid()); dbf.persist(ref); } bus.reply(msg, reply); } });
@Override public void fail(ErrorCode errorCode) { BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply reply = new BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply(); reply.setError(errorCode); bus.reply(msg, reply); } });
@Override public void success(String installPath) { BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply reply = new BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply(); reply.setBackupStorageInstallPath(installPath); completion.success(reply); }
private void handle(BackupVolumeSnapshotFromPrimaryStorageToBackupStorageMsg msg) { BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply reply = new BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply(); reply.setError(operr("backing up snapshots to backup storage is a depreciated feature, which will be removed in future version")); bus.reply(msg, reply); }
private void handle(BackupVolumeSnapshotFromPrimaryStorageToBackupStorageMsg msg) { BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply reply = new BackupVolumeSnapshotFromPrimaryStorageToBackupStorageReply(); reply.setError(operr("backing up snapshots to backup storage is a depreciated feature, which will be removed in future version")); bus.reply(msg, reply); }