}
private void controlStateTransferOnRemoteSite(XSiteBackup xSiteBackup, StateTransferControl control) throws Throwable {
XSiteStateTransferControlCommand command = commandsFactory.buildXSiteStateTransferControlCommand(control, null);
BackupResponse response = invokeRemotelyInRemoteSite(command, xSiteBackup);
response.waitForBackupToFinish();
if (!response.getFailedBackups().values().isEmpty()) {
throw response.getFailedBackups().values().iterator().next();
}
}