Class ReceiverManager


  • public class ReceiverManager
    extends java.lang.Object
    This class is responsible for implementing the RPC processing on the receiver-side. It should only be accessed by the SyncService
    • Constructor Summary

      Constructors 
      Constructor Description
      ReceiverManager()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.apache.iotdb.service.rpc.thrift.TSyncIdentityInfo> getAllTSyncIdentityInfos()  
      void handleClientExit()
      release resources or cleanup when a client (a sender) is disconnected (normally or abnormally).
      org.apache.iotdb.common.rpc.thrift.TSStatus handshake​(org.apache.iotdb.service.rpc.thrift.TSyncIdentityInfo identityInfo)
      Create connection from sender
      org.apache.iotdb.common.rpc.thrift.TSStatus transportFile​(org.apache.iotdb.service.rpc.thrift.TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff)
      Receive TsFile based on startIndex.
      org.apache.iotdb.common.rpc.thrift.TSStatus transportPipeData​(java.nio.ByteBuffer buff)
      Receive PipeData and load it into IoTDB Engine.
      • Methods inherited from class java.lang.Object

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

      • ReceiverManager

        public ReceiverManager()
    • Method Detail

      • handshake

        public org.apache.iotdb.common.rpc.thrift.TSStatus handshake​(org.apache.iotdb.service.rpc.thrift.TSyncIdentityInfo identityInfo)
        Create connection from sender
        Returns:
        TSStatusCode.PIPESERVER_ERROR if fail to connect; TSStatusCode.SUCCESS_STATUS if success to connect.
      • transportPipeData

        public org.apache.iotdb.common.rpc.thrift.TSStatus transportPipeData​(java.nio.ByteBuffer buff)
                                                                      throws org.apache.thrift.TException
        Receive PipeData and load it into IoTDB Engine.
        Returns:
        TSStatusCode.PIPESERVER_ERROR if fail to receive or load; TSStatusCode.SUCCESS_STATUS if load successfully.
        Throws:
        org.apache.thrift.TException - The connection between the sender and the receiver has not been established by handshake(TSyncIdentityInfo)
      • transportFile

        public org.apache.iotdb.common.rpc.thrift.TSStatus transportFile​(org.apache.iotdb.service.rpc.thrift.TSyncTransportMetaInfo metaInfo,
                                                                         java.nio.ByteBuffer buff)
                                                                  throws org.apache.thrift.TException
        Receive TsFile based on startIndex.
        Returns:
        TSStatusCode.SUCCESS_STATUS if receive successfully; TSStatusCode.SYNC_FILE_REBASE if startIndex needs to rollback because mismatched; TSStatusCode.SYNC_FILE_ERROR if fail to receive file.
        Throws:
        org.apache.thrift.TException - The connection between the sender and the receiver has not been established by handshake(TSyncIdentityInfo)
      • handleClientExit

        public void handleClientExit()
        release resources or cleanup when a client (a sender) is disconnected (normally or abnormally).
      • getAllTSyncIdentityInfos

        public java.util.List<org.apache.iotdb.service.rpc.thrift.TSyncIdentityInfo> getAllTSyncIdentityInfos()