Class CleanupRemoteFile
- java.lang.Object
-
- org.syncany.plugins.transfer.files.RemoteFile
-
- org.syncany.plugins.transfer.files.CleanupRemoteFile
-
public class CleanupRemoteFile extends RemoteFile
The transaction file only exists as an indicator to other clients a cleanup has occurred.Name pattern: The name pattern of a cleanup file is cleanup-<cleanupnumber>.
-
-
Constructor Summary
Constructors Constructor Description CleanupRemoteFile(long cleanupNumber)
Initializes a new transaction file, given which cleanup has occurredCleanupRemoteFile(java.lang.String name)
Initializes a new cleanup file, given a name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCleanupNumber()
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
-
CleanupRemoteFile
public CleanupRemoteFile(java.lang.String name) throws StorageException
Initializes a new cleanup file, given a name.- Parameters:
name
- cleanup file name; must always match theNAME_PATTERN
- Throws:
StorageException
- If the name is not match the name pattern
-
CleanupRemoteFile
public CleanupRemoteFile(long cleanupNumber) throws StorageException
Initializes a new transaction file, given which cleanup has occurred- Throws:
StorageException
- If the name is not match the name pattern
-
-
Method Detail
-
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.
-
getCleanupNumber
public long getCleanupNumber()
-
-