Class ReceiverManager
- java.lang.Object
-
- org.apache.iotdb.db.sync.transport.server.ReceiverManager
-
public class ReceiverManager extends java.lang.ObjectThis 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()voidhandleClientExit()release resources or cleanup when a client (a sender) is disconnected (normally or abnormally).org.apache.iotdb.common.rpc.thrift.TSStatushandshake(org.apache.iotdb.service.rpc.thrift.TSyncIdentityInfo identityInfo)Create connection from senderorg.apache.iotdb.common.rpc.thrift.TSStatustransportFile(org.apache.iotdb.service.rpc.thrift.TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff)Receive TsFile based on startIndex.org.apache.iotdb.common.rpc.thrift.TSStatustransportPipeData(java.nio.ByteBuffer buff)ReceivePipeDataand load it into IoTDB Engine.
-
-
-
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_ERRORif fail to connect;TSStatusCode.SUCCESS_STATUSif success to connect.
-
transportPipeData
public org.apache.iotdb.common.rpc.thrift.TSStatus transportPipeData(java.nio.ByteBuffer buff) throws org.apache.thrift.TExceptionReceivePipeDataand load it into IoTDB Engine.- Returns:
TSStatusCode.PIPESERVER_ERRORif fail to receive or load;TSStatusCode.SUCCESS_STATUSif load successfully.- Throws:
org.apache.thrift.TException- The connection between the sender and the receiver has not been established byhandshake(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.TExceptionReceive TsFile based on startIndex.- Returns:
TSStatusCode.SUCCESS_STATUSif receive successfully;TSStatusCode.SYNC_FILE_REBASEif startIndex needs to rollback because mismatched;TSStatusCode.SYNC_FILE_ERRORif fail to receive file.- Throws:
org.apache.thrift.TException- The connection between the sender and the receiver has not been established byhandshake(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()
-
-