Class 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
      void close()  
      boolean handshake()
      Create thrift connection to receiver.
      boolean send​(PipeData pipeData)
      Send PipeData to receiver and load.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IoTDBSyncClient

        public IoTDBSyncClient​(Pipe pipe,
                               java.lang.String ipAddress,
                               int port,
                               java.lang.String localIP)
        Parameters:
        pipe - sync task
        ipAddress - remote ip address
        port - remote port
        localIP - local ip address
    • Method Detail

      • handshake

        public boolean handshake()
                          throws SyncConnectionException
        Create thrift connection to receiver. Check IoTDB version to make sure compatibility
        Specified by:
        handshake in interface ISyncClient
        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
        Send PipeData to receiver and load. If PipeData is TsFilePipeData, The TsFiles will be transferred before the PipeData transfer.
        Specified by:
        send in interface ISyncClient
        Returns:
        true if success; false if failed to send or load.
        Throws:
        SyncConnectionException - cannot create connection to receiver