public interface ISyncClient
| 限定符和类型 | 方法和说明 |
|---|---|
void |
confirmIdentity()
Confirm identity, the receiver will check whether the sender has synchronization privileges.
|
void |
establishConnection(String serverIp,
int serverPort)
Establish a connection to receiver end.
|
void |
init() |
void |
startMonitor()
Start monitor thread, which monitor sync status.
|
void |
startTimedTask()
Start sync task in a certain time.
|
void |
stop()
Stop sync process
|
void |
sync()
Execute a sync task for a data directory.
|
void |
syncAll()
Execute a sync task for all data directory.
|
void |
syncDataFilesInOneGroup(String sgName,
Long vgId,
Long timeRangeId,
Set<File> toBeSyncFiles)
For new valid files in a storage group, sync them to receiver side and load these data in
receiver.
|
void |
syncDeletedFilesNameInOneGroup(String sgName,
Long vgId,
Long timeRangeId,
Set<File> deletedFilesName)
For deleted files in a storage group, sync them to receiver side and load these files in
receiver.
|
void |
syncSchema()
Sync schema file to receiver before all data to be synced.
|
void |
verifySingleton()
Verify whether the client lock file is locked or not, ensuring that only one client is running.
|
void init()
void verifySingleton()
throws IOException
IOExceptionvoid startMonitor()
void startTimedTask()
void establishConnection(String serverIp, int serverPort) throws SyncConnectionException
void confirmIdentity()
throws SyncConnectionException,
IOException
void syncSchema()
throws SyncConnectionException,
org.apache.thrift.TException
SyncConnectionExceptionorg.apache.thrift.TExceptionvoid syncDeletedFilesNameInOneGroup(String sgName, Long vgId, Long timeRangeId, Set<File> deletedFilesName) throws SyncConnectionException, IOException
sgName - storage group namevgId - virtual group idtimeRangeId - id of time rangedeletedFilesName - list of deleted file namesSyncConnectionExceptionIOExceptionvoid syncAll()
throws SyncConnectionException,
IOException,
org.apache.thrift.TException
SyncConnectionExceptionIOExceptionorg.apache.thrift.TExceptionvoid sync() throws SyncConnectionException, IOException
void syncDataFilesInOneGroup(String sgName, Long vgId, Long timeRangeId, Set<File> toBeSyncFiles) throws SyncConnectionException, IOException, SyncDeviceOwnerConflictException
sgName - storage group namevgId - virtual group idtimeRangeId - id of time rangetoBeSyncFiles - list of new tsfile namesSyncConnectionExceptionIOExceptionSyncDeviceOwnerConflictExceptionvoid stop()
Copyright © 2022 The Apache Software Foundation. All rights reserved.