Class IoTDBSyncClient
- java.lang.Object
-
- org.apache.iotdb.db.sync.transport.client.IoTDBSyncClient
-
- All Implemented Interfaces:
ISyncClient
public class IoTDBSyncClient extends java.lang.Object implements ISyncClient
-
-
Constructor Summary
Constructors Constructor Description IoTDBSyncClient(Pipe pipe, java.lang.String ipAddress, int port, java.lang.String localIP)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhandshake()Create thrift connection to receiver.booleansend(PipeData pipeData)SendPipeDatato receiver and load.
-
-
-
Constructor Detail
-
IoTDBSyncClient
public IoTDBSyncClient(Pipe pipe, java.lang.String ipAddress, int port, java.lang.String localIP)
- Parameters:
pipe- sync taskipAddress- remote ip addressport- remote portlocalIP- local ip address
-
-
Method Detail
-
handshake
public boolean handshake() throws SyncConnectionExceptionCreate thrift connection to receiver. Check IoTDB version to make sure compatibility- Specified by:
handshakein interfaceISyncClient- Returns:
- true if success; false if failed to check IoTDB version.
- Throws:
SyncConnectionException- cannot create connection to receiver
-
send
public boolean send(PipeData pipeData) throws SyncConnectionException
SendPipeDatato receiver and load. If PipeData is TsFilePipeData, The TsFiles will be transferred before the PipeData transfer.- Specified by:
sendin interfaceISyncClient- Returns:
- true if success; false if failed to send or load.
- Throws:
SyncConnectionException- cannot create connection to receiver
-
close
public void close()
- Specified by:
closein interfaceISyncClient
-
-