public class BackupTracker extends Object
Constructor and Description |
---|
BackupTracker()
Creates a tracker.
|
Modifier and Type | Method and Description |
---|---|
BackupStatus |
getCurrentStatus() |
AtomicLong |
getEntryCounter() |
BackupStatus |
getStatus(UUID backupId) |
boolean |
inProgress() |
void |
reset()
Resets this tracker.
|
void |
update(BackupStatus status)
Replaces the internal status with given status.
|
void |
updateBackupUri(AlluxioURI backupUri)
Updates backup URI of status.
|
void |
updateError(AlluxioException error)
Updates the error of backup status.
|
void |
updateHostname(String hostname)
Updates hostname of backup status.
|
void |
updateState(BackupState state)
Updates the state of backup status.
|
void |
waitUntilFinished()
Used to wait until this backup is finished.
|
boolean |
waitUntilFinished(long timeout,
TimeUnit unit)
Used to wait until this backup is finished.
|
public void reset()
public BackupStatus getCurrentStatus()
public BackupStatus getStatus(UUID backupId)
backupId
- the backup idpublic AtomicLong getEntryCounter()
public void update(BackupStatus status)
status
- the backup statuspublic void updateHostname(String hostname)
hostname
- the hostnamepublic void updateBackupUri(AlluxioURI backupUri)
backupUri
- the backup URIpublic void updateState(BackupState state)
state
- the backup statepublic void updateError(AlluxioException error)
error
- the backup errorpublic void waitUntilFinished() throws AlluxioException
AlluxioStatusException
- if backup failedAlluxioException
public boolean waitUntilFinished(long timeout, TimeUnit unit)
timeout
- timeout durationunit
- time unittrue
if backup is finishedpublic boolean inProgress()
true
if a backup is in progressCopyright © 2023. All Rights Reserved.