Class CommunicationTool
- java.lang.Object
-
- risesoft.data.transfer.core.statistics.CommunicationTool
-
public final class CommunicationTool extends Object
统计信息业务层面处理- Author:
- lb
- Date:
- 2023年12月4日
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommunicationTool.Stringify
-
Field Summary
Fields Modifier and Type Field Description static StringBYTE_SPEEDstatic StringPERCENTAGEstatic StringREAD_FAILED_BYTESstatic StringREAD_FAILED_RECORDSstatic StringREAD_JOB_ENDstatic StringREAD_JOB_STARTstatic StringREAD_SUCCEED_BYTESstatic StringREAD_SUCCEED_RECORDSstatic StringRECORD_SPEEDstatic StringSTAGEstatic StringWRITE_FAILED_BYTESstatic StringWRITE_FAILED_RECORDSstatic StringWRITE_RECEIVED_BYTESstatic StringWRITE_RECEIVED_RECORDSstatic StringWRITER_JOB_ENDstatic StringWRITER_JOB_START
-
Constructor Summary
Constructors Constructor Description CommunicationTool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longgetRecordSize(List<Record> records)static longgetRecordSize(List<Record> records, int start, int end)static RecordSizegetRecordSizeOfSpeed(List<Record> records, int start, int end, int speed)static CommunicationgetReportCommunication(Communication now, Communication old, int totalStage)static StringgetStateInfo(Communication communication, JobContext jobContext)static StringgetStatistics(Communication communication)static StringgetStatus(State state)static longgetTotalErrorBytes(Communication communication)static longgetTotalErrorRecords(Communication communication)static longgetTotalReadBytes(Communication communication)static longgetTotalReadRecords(Communication communication)static longgetWriteSucceedBytes(Communication communication)static longgetWriteSucceedRecords(Communication communication)
-
-
-
Field Detail
-
STAGE
public static final String STAGE
- See Also:
- Constant Field Values
-
BYTE_SPEED
public static final String BYTE_SPEED
- See Also:
- Constant Field Values
-
RECORD_SPEED
public static final String RECORD_SPEED
- See Also:
- Constant Field Values
-
PERCENTAGE
public static final String PERCENTAGE
- See Also:
- Constant Field Values
-
READ_SUCCEED_RECORDS
public static final String READ_SUCCEED_RECORDS
- See Also:
- Constant Field Values
-
READ_SUCCEED_BYTES
public static final String READ_SUCCEED_BYTES
- See Also:
- Constant Field Values
-
READ_FAILED_RECORDS
public static final String READ_FAILED_RECORDS
- See Also:
- Constant Field Values
-
READ_FAILED_BYTES
public static final String READ_FAILED_BYTES
- See Also:
- Constant Field Values
-
WRITE_RECEIVED_RECORDS
public static final String WRITE_RECEIVED_RECORDS
- See Also:
- Constant Field Values
-
WRITE_RECEIVED_BYTES
public static final String WRITE_RECEIVED_BYTES
- See Also:
- Constant Field Values
-
WRITE_FAILED_RECORDS
public static final String WRITE_FAILED_RECORDS
- See Also:
- Constant Field Values
-
WRITE_FAILED_BYTES
public static final String WRITE_FAILED_BYTES
- See Also:
- Constant Field Values
-
READ_JOB_END
public static final String READ_JOB_END
- See Also:
- Constant Field Values
-
READ_JOB_START
public static final String READ_JOB_START
- See Also:
- Constant Field Values
-
WRITER_JOB_END
public static final String WRITER_JOB_END
- See Also:
- Constant Field Values
-
WRITER_JOB_START
public static final String WRITER_JOB_START
- See Also:
- Constant Field Values
-
-
Method Detail
-
getReportCommunication
public static Communication getReportCommunication(Communication now, Communication old, int totalStage)
-
getTotalReadRecords
public static long getTotalReadRecords(Communication communication)
-
getTotalReadBytes
public static long getTotalReadBytes(Communication communication)
-
getStatistics
public static String getStatistics(Communication communication)
-
getTotalErrorRecords
public static long getTotalErrorRecords(Communication communication)
-
getRecordSizeOfSpeed
public static RecordSize getRecordSizeOfSpeed(List<Record> records, int start, int end, int speed)
-
getTotalErrorBytes
public static long getTotalErrorBytes(Communication communication)
-
getWriteSucceedRecords
public static long getWriteSucceedRecords(Communication communication)
-
getWriteSucceedBytes
public static long getWriteSucceedBytes(Communication communication)
-
getStateInfo
public static String getStateInfo(Communication communication, JobContext jobContext)
-
-