Class ActionRemoteFile
- java.lang.Object
-
- org.syncany.plugins.transfer.files.RemoteFile
-
- org.syncany.plugins.transfer.files.ActionRemoteFile
-
public class ActionRemoteFile extends RemoteFile
Action remote files represent a running transfer operation on the remote storage. Transfer operations are operations that modify the repository and/or are relevant for the consistency of the local directory or the remote repository. Action files have no content, they are just markers and exist only while an operation is running.Name pattern: The name pattern of an action file is action-<operationname>-<machinename>-<timestamp>. Initializing an instance with a non-matching name will throw an exception.
-
-
Constructor Summary
Constructors Constructor Description ActionRemoteFile(java.lang.String name)
ActionRemoteFile(java.lang.String operationName, java.lang.String clientName, long timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClientName()
java.lang.String
getOperationName()
long
getTimestamp()
protected java.lang.String
validateName(java.lang.String name)
Parses the name of the file and validates it against the classes name pattern.-
Methods inherited from class org.syncany.plugins.transfer.files.RemoteFile
createRemoteFile, createRemoteFile, equals, getAttributes, getName, hashCode, setAttributes, toString
-
-
-
-
Constructor Detail
-
ActionRemoteFile
public ActionRemoteFile(java.lang.String name) throws StorageException
- Throws:
StorageException
-
ActionRemoteFile
public ActionRemoteFile(java.lang.String operationName, java.lang.String clientName, long timestamp) throws StorageException
- Throws:
StorageException
-
-
Method Detail
-
getOperationName
public java.lang.String getOperationName()
-
getClientName
public java.lang.String getClientName()
-
getTimestamp
public long getTimestamp()
-
validateName
protected java.lang.String validateName(java.lang.String name) throws StorageException
Description copied from class:RemoteFile
Parses the name of the file and validates it against the classes name pattern. WhileRemoteFile
has no name pattern (and never throws an exception), sub-classes might by overriding this method.- Overrides:
validateName
in classRemoteFile
- Parameters:
name
- The name of the file (as it is identified by Syncany)- Returns:
- Returns a (potentially changed) name, after validating the name
- Throws:
StorageException
- If the name does not match the name pattern defined by the class.
Note:RemoteFile
does never throw this exceptions, however, subclasses might.
-
-