public class BackupStatus extends Object
Constructor and Description |
---|
BackupStatus(BackupState state)
Creates a new backup status with new Id.
|
BackupStatus(BackupStatus status)
Cloning constructor.
|
BackupStatus(UUID backupId,
BackupState state)
Creates a new backup status with existing Id.
|
Modifier and Type | Method and Description |
---|---|
static BackupStatus |
fromProto(BackupPStatus pStatus) |
UUID |
getBackupId() |
AlluxioURI |
getBackupUri() |
long |
getEntryCount() |
AlluxioException |
getError() |
String |
getHostname() |
BackupState |
getState() |
boolean |
isCompleted() |
boolean |
isFailed() |
boolean |
isFinished() |
void |
setBackupId(UUID backupUuid)
Sets the unique backup id.
|
BackupStatus |
setBackupUri(AlluxioURI backupUri)
Sets the backup uri.
|
BackupStatus |
setEntryCount(long entryCount)
Sets entry count.
|
BackupStatus |
setError(AlluxioException error)
Fails the backup with given error.
|
BackupStatus |
setHostname(String hostName)
Sets the backup host.
|
BackupStatus |
setState(BackupState state)
Sets the backup state.
|
BackupPStatus |
toProto() |
String |
toString() |
public BackupStatus(BackupState state)
state
- state of the backuppublic BackupStatus(UUID backupId, BackupState state)
backupId
- the backup idstate
- state of the backuppublic BackupStatus(BackupStatus status)
status
- backup status to clonepublic static BackupStatus fromProto(BackupPStatus pStatus)
pStatus
- proto backup statuspublic UUID getBackupId()
public void setBackupId(UUID backupUuid)
backupUuid
- backup idpublic long getEntryCount()
public BackupStatus setEntryCount(long entryCount)
entryCount
- the entry countpublic boolean isFinished()
true
if the backup is finished (completed | failed)public boolean isCompleted()
true
if the backup is completed successfullypublic boolean isFailed()
true
if the backup is failedpublic BackupState getState()
public BackupStatus setState(BackupState state)
state
- the backup statepublic AlluxioException getError()
public BackupStatus setError(AlluxioException error)
BackupState.Failed
.error
- the backup errorpublic String getHostname()
public BackupStatus setHostname(String hostName)
hostName
- the backup hostpublic AlluxioURI getBackupUri()
public BackupStatus setBackupUri(AlluxioURI backupUri)
backupUri
- the backup uripublic BackupPStatus toProto()
Copyright © 2023. All Rights Reserved.