X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.backup%2Fsrc%2Forg%2Fsimantics%2Fbackup%2FIBackupProvider.java;h=862ffdbc88e81e9146cd583706fc70995bd1fc4e;hp=9bab31b8b41725f6851b06ed7c173f8b6920cf29;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.backup/src/org/simantics/backup/IBackupProvider.java b/bundles/org.simantics.backup/src/org/simantics/backup/IBackupProvider.java index 9bab31b8b..862ffdbc8 100644 --- a/bundles/org.simantics.backup/src/org/simantics/backup/IBackupProvider.java +++ b/bundles/org.simantics.backup/src/org/simantics/backup/IBackupProvider.java @@ -1,49 +1,49 @@ -package org.simantics.backup; - -import java.nio.file.Path; -import java.util.concurrent.Future; - -/** - * Interface for providing backup capabilities to Simantics products. - * BackupProviders are used in {@link BackupProviderService}. - * - * @author Jani Simomaa - */ -public interface IBackupProvider { - - /** - * Lock the resources that are going to be backed up in a way that allows - * making an atomic and consistent copy of the backed up resources. - */ - void lock() throws BackupException; - - /** - * Initiates or executes the backing up procedure of this provider. The - * backup procedure is allowed to return from this method and complete - * asynchronously. A {@link Future} is returned to allow waiting for backup - * to complete. - * - * @param targetPath - * @param revision - * @return a future that can be waited upon to wait for the backup procedure - * to complete. - */ - Future backup(Path targetPath, int revision) throws BackupException; - - /** - * The counterpart of {@link #lock()} that must be invoked and invoked only - * after {@link #lock()} has been successfully invoked - */ - void unlock() throws BackupException; - - /** - * Restore implementation for this provider. - * - * @param fromPath - * @param revision - * - * TODO: change to return {@link Future} that can be waited upon - */ - void restore(Path fromPath, int revision) throws BackupException; - -} +package org.simantics.backup; + +import java.nio.file.Path; +import java.util.concurrent.Future; + +/** + * Interface for providing backup capabilities to Simantics products. + * BackupProviders are used in {@link BackupProviderService}. + * + * @author Jani Simomaa + */ +public interface IBackupProvider { + + /** + * Lock the resources that are going to be backed up in a way that allows + * making an atomic and consistent copy of the backed up resources. + */ + void lock() throws BackupException; + + /** + * Initiates or executes the backing up procedure of this provider. The + * backup procedure is allowed to return from this method and complete + * asynchronously. A {@link Future} is returned to allow waiting for backup + * to complete. + * + * @param targetPath + * @param revision + * @return a future that can be waited upon to wait for the backup procedure + * to complete. + */ + Future backup(Path targetPath, int revision) throws BackupException; + + /** + * The counterpart of {@link #lock()} that must be invoked and invoked only + * after {@link #lock()} has been successfully invoked + */ + void unlock() throws BackupException; + + /** + * Restore implementation for this provider. + * + * @param fromPath + * @param revision + * + * TODO: change to return {@link Future} that can be waited upon + */ + void restore(Path fromPath, int revision) throws BackupException; + +}