public class SyncCheck extends Object
UfsSyncPathCache.shouldSyncPath(alluxio.AlluxioURI, long, alluxio.file.options.DescendantType)
indicating whether
a sync is needed as well as the time of the last sync if one is not needed.
After the sync is performed, calling syncSuccess()
or
skippedSync()
will result in creating an object containing
information pertaining to the result of the sync.Modifier and Type | Class and Description |
---|---|
static class |
SyncCheck.SyncResult
Information about the result of a synchronization, created by calling
syncSuccess() or skippedSync() ,
or using SyncCheck.SyncResult.INVALID_RESULT if the sync failed
due to an external reason. |
Modifier and Type | Field and Description |
---|---|
static SyncCheck |
SHOULD_NOT_SYNC
Sync is not needed, with no last sync time.
|
static SyncCheck |
SHOULD_SYNC
Sync is needed.
|
Modifier and Type | Method and Description |
---|---|
long |
getLastSyncTime() |
boolean |
isShouldSync() |
static SyncCheck |
shouldNotSyncWithTime(long lastSyncTime)
Create a SyncCheck object indicating a sync is not needed due to
a recent sync.
|
static SyncCheck |
shouldSyncWithTime(long lastSyncTime)
Create a SyncCheck object indicating a sync is needed, given
the last sync time.
|
SyncCheck.SyncResult |
skippedSync()
This method should be called if the sync skipped due to the existence
of a recent sync.
|
SyncCheck.SyncResult |
syncSuccess()
This method should be called if the sync was performed successfully.
|
String |
toString() |
public static final SyncCheck SHOULD_NOT_SYNC
public static final SyncCheck SHOULD_SYNC
public static SyncCheck shouldSyncWithTime(long lastSyncTime)
lastSyncTime
- the time of the last syncpublic static SyncCheck shouldNotSyncWithTime(long lastSyncTime)
lastSyncTime
- the time of the last syncpublic boolean isShouldSync()
public long getLastSyncTime()
public SyncCheck.SyncResult syncSuccess()
SyncCheck.SyncResult
objectpublic SyncCheck.SyncResult skippedSync()
SyncCheck.SyncResult
objectCopyright © 2023. All Rights Reserved.