@Override public void success(GetImageSizeRsp rsp) { reply.setSize(rsp.size); // current fusionstor cannot get actual size long asize = rsp.actualSize == null ? msg.getImage().getActualSize() : rsp.actualSize; reply.setActualSize(asize); bus.reply(msg, reply); }
SyncImageSizeOnBackupStorageMsg smsg = new SyncImageSizeOnBackupStorageMsg(); smsg.setBackupStorageUuid(backupStorageUuid); smsg.setImage(ImageInventory.valueOf(self)); bus.makeTargetServiceIdByResourceUuid(smsg, BackupStorageConstant.SERVICE_ID, backupStorageUuid); bus.send(smsg, new CloudBusCallBack(completion) {
@Override public void success(GetImageSizeRsp rsp) { reply.setSize(rsp.size); // current ceph cannot get actual size long asize = rsp.actualSize == null ? msg.getImage().getActualSize() : rsp.actualSize; reply.setActualSize(asize); bus.reply(msg, reply); }
@Override protected void handle(final SyncImageSizeOnBackupStorageMsg msg) { GetImageSizeCmd cmd = new GetImageSizeCmd(); cmd.imageUuid = msg.getImage().getUuid(); ImageBackupStorageRefInventory ref = CollectionUtils.find(msg.getImage().getBackupStorageRefs(), new Function<ImageBackupStorageRefInventory, ImageBackupStorageRefInventory>() { @Override public ImageBackupStorageRefInventory call(ImageBackupStorageRefInventory arg) { " the backup storage[uuid:%s]", msg.getImage().getUuid(), self.getUuid()));
@Override protected void handle(final SyncImageSizeOnBackupStorageMsg msg) { GetImageSizeCmd cmd = new GetImageSizeCmd(); cmd.imageUuid = msg.getImage().getUuid(); ImageBackupStorageRefInventory ref = CollectionUtils.find(msg.getImage().getBackupStorageRefs(), new Function<ImageBackupStorageRefInventory, ImageBackupStorageRefInventory>() { @Override public ImageBackupStorageRefInventory call(ImageBackupStorageRefInventory arg) { " the backup storage[uuid:%s]", msg.getImage().getUuid(), self.getUuid()));
final SyncImageSizeOnBackupStorageReply reply = new SyncImageSizeOnBackupStorageReply(); ImageInventory image = msg.getImage(); GetImageSizeCmd cmd = new GetImageSizeCmd(); cmd.imageUuid = image.getUuid();