Class DumpArchiveSummary
- java.lang.Object
-
- org.apache.commons.compress.archivers.dump.DumpArchiveSummary
-
public class DumpArchiveSummary extends java.lang.ObjectThis class represents identifying information about a Dump archive volume. It consists the archive's dump date, label, hostname, device name and possibly last mount point plus the volume's volume id andfirst record number. For the corresponding C structure see the header ofDumpArchiveEntry.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetDevname()Get the device name, e.g., /dev/sda3 or /dev/mapper/vg0-home.java.util.DategetDumpDate()Get the date of this dump.java.lang.StringgetFilesystem()Get the last mountpoint, e.g., /home.intgetFirstRecord()Get the inode of the first record on this volume.intgetFlags()Get the miscellaneous flags.java.lang.StringgetHostname()Get the hostname of the system where the dump was performed.java.lang.StringgetLabel()Get dump label.intgetLevel()Get the level of this dump.intgetNTRec()Get the number of records per tape block.java.util.DategetPreviousDumpDate()Get the date of the previous dump at this level higher.intgetVolume()Get volume (tape) number.inthashCode()booleanisCompressed()Is this volume compressed? N.B., individual blocks may or may not be compressed.booleanisExtendedAttributes()Does this volume contain extended attributes.booleanisMetaDataOnly()Does this volume only contain metadata?booleanisNewHeader()Is this the new header format? (We do not currently support the old format.)booleanisNewInode()Is this the new inode format? (We do not currently support the old format.)voidsetDevname(java.lang.String devname)Set the device name.voidsetDumpDate(java.util.Date dumpDate)Set dump date.voidsetFilesystem(java.lang.String fileSystem)Set the last mountpoint.voidsetFirstRecord(int firstrec)Set the inode of the first record.voidsetFlags(int flags)Set the miscellaneous flags.voidsetHostname(java.lang.String hostname)Set the hostname.voidsetLabel(java.lang.String label)Set dump label.voidsetLevel(int level)Set level.voidsetNTRec(int ntrec)Set the number of records per tape block.voidsetPreviousDumpDate(java.util.Date previousDumpDate)Set previous dump date.voidsetVolume(int volume)Set volume (tape) number.
-
-
-
Method Detail
-
getDumpDate
public java.util.Date getDumpDate()
Get the date of this dump.- Returns:
- the date of this dump.
-
setDumpDate
public void setDumpDate(java.util.Date dumpDate)
Set dump date.- Parameters:
dumpDate- the dump date
-
getPreviousDumpDate
public java.util.Date getPreviousDumpDate()
Get the date of the previous dump at this level higher.- Returns:
- dumpdate may be null
-
setPreviousDumpDate
public void setPreviousDumpDate(java.util.Date previousDumpDate)
Set previous dump date.- Parameters:
previousDumpDate- the previous dump dat
-
getVolume
public int getVolume()
Get volume (tape) number.- Returns:
- volume (tape) number.
-
setVolume
public void setVolume(int volume)
Set volume (tape) number.- Parameters:
volume- the volume number
-
getLevel
public int getLevel()
Get the level of this dump. This is a number between 0 and 9, inclusive, and a level 0 dump is a complete dump of the partition. For any other dump 'n' this dump contains all files that have changed since the last dump at this level or lower. This is used to support different levels of incremental backups.- Returns:
- dump level
-
setLevel
public void setLevel(int level)
Set level.- Parameters:
level- the level
-
getLabel
public java.lang.String getLabel()
Get dump label. This may be autogenerated or it may be specified bu the user.- Returns:
- dump label
-
setLabel
public void setLabel(java.lang.String label)
Set dump label.- Parameters:
label- the label
-
getFilesystem
public java.lang.String getFilesystem()
Get the last mountpoint, e.g., /home.- Returns:
- last mountpoint
-
setFilesystem
public void setFilesystem(java.lang.String fileSystem)
Set the last mountpoint.- Parameters:
fileSystem- the last mountpoint
-
getDevname
public java.lang.String getDevname()
Get the device name, e.g., /dev/sda3 or /dev/mapper/vg0-home.- Returns:
- device name
-
setDevname
public void setDevname(java.lang.String devname)
Set the device name.- Parameters:
devname- the device name
-
getHostname
public java.lang.String getHostname()
Get the hostname of the system where the dump was performed.- Returns:
- hostname the host name
-
setHostname
public void setHostname(java.lang.String hostname)
Set the hostname.- Parameters:
hostname- the host name
-
getFlags
public int getFlags()
Get the miscellaneous flags. See below.- Returns:
- flags
-
setFlags
public void setFlags(int flags)
Set the miscellaneous flags.- Parameters:
flags- flags
-
getFirstRecord
public int getFirstRecord()
Get the inode of the first record on this volume.- Returns:
- inode of the first record on this volume.
-
setFirstRecord
public void setFirstRecord(int firstrec)
Set the inode of the first record.- Parameters:
firstrec- the first record
-
getNTRec
public int getNTRec()
Get the number of records per tape block. This is typically between 10 and 32.- Returns:
- the number of records per tape block
-
setNTRec
public void setNTRec(int ntrec)
Set the number of records per tape block.- Parameters:
ntrec- the number of records per tape block
-
isNewHeader
public boolean isNewHeader()
Is this the new header format? (We do not currently support the old format.)- Returns:
- true if using new header format
-
isNewInode
public boolean isNewInode()
Is this the new inode format? (We do not currently support the old format.)- Returns:
- true if using new inode format
-
isCompressed
public boolean isCompressed()
Is this volume compressed? N.B., individual blocks may or may not be compressed. The first block is never compressed.- Returns:
- true if volume is compressed
-
isMetaDataOnly
public boolean isMetaDataOnly()
Does this volume only contain metadata?- Returns:
- true if volume only contains meta-data
-
isExtendedAttributes
public boolean isExtendedAttributes()
Does this volume contain extended attributes.- Returns:
- true if volume contains extended attributes.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-