Package net.solarnetwork.node.backup
Class SimpleBackup
java.lang.Object
net.solarnetwork.node.backup.SimpleBackup
- All Implemented Interfaces:
Backup,BackupIdentity
Simple implementation of
Backup.- Version:
- 1.2
- Author:
- matt
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleBackup(Long nodeId, Date date, String key, Long size, boolean complete) Construct with values.Construct with values.SimpleBackup(Date date, String key, Long size, boolean complete) Construct with values.SimpleBackup(BackupIdentity ident, Long size, boolean complete) Construct from an identity with values. -
Method Summary
Modifier and TypeMethodDescriptiongetDate()Get the date the backup was created.getKey()Get a unique key for the backup.Get the node ID associated with the backup.Get an optional qualifier.getSize()Get the size, in bytes, of this backup.booleanBoolean flag indicating if this backup is complete.
-
Constructor Details
-
SimpleBackup
Construct with values.- Parameters:
date- the datekey- the keysize- the sizecomplete- the complete flag
-
SimpleBackup
Construct with values.- Parameters:
nodeId- the node IDdate- the datekey- the keysize- the sizecomplete- the complete flag
-
SimpleBackup
public SimpleBackup(Long nodeId, Date date, String qualifier, String key, Long size, boolean complete) Construct with values.- Parameters:
nodeId- the node IDdate- the datequalifier- the qualifierkey- the keysize- the sizecomplete- the complete flag- Since:
- 1.2
-
SimpleBackup
Construct from an identity with values.- Parameters:
ident- the backup identity infosize- the sizecomplete- the complete flag- Since:
- 1.2
-
-
Method Details
-
getNodeId
Description copied from interface:BackupIdentityGet the node ID associated with the backup.- Specified by:
getNodeIdin interfaceBackupIdentity- Returns:
- the node ID
-
getDate
Description copied from interface:BackupIdentityGet the date the backup was created.- Specified by:
getDatein interfaceBackupIdentity- Returns:
- the backup date
-
getQualifier
Description copied from interface:BackupIdentityGet an optional qualifier.A qualifier can be used to provide a backup with a more descriptive name or tag.
- Specified by:
getQualifierin interfaceBackupIdentity- Returns:
- the qualifier, or null if not known
-
getKey
Description copied from interface:BackupIdentityGet a unique key for the backup.- Specified by:
getKeyin interfaceBackupIdentity- Returns:
- the backup key
-
getSize
Description copied from interface:BackupGet the size, in bytes, of this backup. -
isComplete
public boolean isComplete()Description copied from interface:BackupBoolean flag indicating if this backup is complete.- Specified by:
isCompletein interfaceBackup- Returns:
- true if the backup is finished, false otherwise
-