Class SimpleBackup

java.lang.Object
net.solarnetwork.node.backup.SimpleBackup
All Implemented Interfaces:
Backup, BackupIdentity

public class SimpleBackup extends Object implements Backup
Simple implementation of Backup.
Version:
1.2
Author:
matt
  • Constructor Details

    • SimpleBackup

      public SimpleBackup(Date date, String key, Long size, boolean complete)
      Construct with values.
      Parameters:
      date - the date
      key - the key
      size - the size
      complete - the complete flag
    • SimpleBackup

      public SimpleBackup(Long nodeId, Date date, String key, Long size, boolean complete)
      Construct with values.
      Parameters:
      nodeId - the node ID
      date - the date
      key - the key
      size - the size
      complete - 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 ID
      date - the date
      qualifier - the qualifier
      key - the key
      size - the size
      complete - the complete flag
      Since:
      1.2
    • SimpleBackup

      public SimpleBackup(BackupIdentity ident, Long size, boolean complete)
      Construct from an identity with values.
      Parameters:
      ident - the backup identity info
      size - the size
      complete - the complete flag
      Since:
      1.2
  • Method Details

    • getNodeId

      public Long getNodeId()
      Description copied from interface: BackupIdentity
      Get the node ID associated with the backup.
      Specified by:
      getNodeId in interface BackupIdentity
      Returns:
      the node ID
    • getDate

      public Date getDate()
      Description copied from interface: BackupIdentity
      Get the date the backup was created.
      Specified by:
      getDate in interface BackupIdentity
      Returns:
      the backup date
    • getQualifier

      public String getQualifier()
      Description copied from interface: BackupIdentity
      Get an optional qualifier.

      A qualifier can be used to provide a backup with a more descriptive name or tag.

      Specified by:
      getQualifier in interface BackupIdentity
      Returns:
      the qualifier, or null if not known
    • getKey

      public String getKey()
      Description copied from interface: BackupIdentity
      Get a unique key for the backup.
      Specified by:
      getKey in interface BackupIdentity
      Returns:
      the backup key
    • getSize

      public Long getSize()
      Description copied from interface: Backup
      Get the size, in bytes, of this backup.
      Specified by:
      getSize in interface Backup
      Returns:
      the size in bytes, or null if not known
    • isComplete

      public boolean isComplete()
      Description copied from interface: Backup
      Boolean flag indicating if this backup is complete.
      Specified by:
      isComplete in interface Backup
      Returns:
      true if the backup is finished, false otherwise