All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.openservices.ons.api.exactlyonce.TxConstant Maven / Gradle / Ivy

There is a newer version: 1.9.4.Final
Show newest version
package com.aliyun.openservices.ons.api.exactlyonce;

/**
 * @author gongshi
 */
public class TxConstant {
    /**
     * Min persist time for record in transaction_record table
     */
    public static final int DEFAULT_RECORD_RETENTION_SECOND = 60 * 3;

    /**
     * Max persist time for record in transaction_record table
     */
    public static final int MAX_RECORD_RETENTION_MILLISECOND = 3 * 24 * 60 * 60 * 1000;

    /**
     * Default interval for scan acked record(millisecond)
     */
    public static final int DEFAULT_RECORD_MANAGER_CLEAN_INTERVAL_MILLISECOND = 10000;

    /**
     * Interval for clean invalid consume record
     */
    public static final int DEFAULT_CLEAN_UNACTIVE_INTERVAL_SECOND = 86400;

    /**
     * Queue size for threadpool which is used for delete acked record
     */
    public static final int DEFAULT_CLEAN_RECORD_QUEUE_SIZE = 10;

    /**
     * Threshold for stop scan record for message queue
     */
    public static final int MIN_EXPIRED_COUNT_FOR_QUEUE = 50;

    /**
     * Return limit for echo query of acked record
     */
    public static final int EXPIRED_TXRECORD_LOAD_STEP = 200;

    /**
     * Lower bound for transaction timeout
     */
    public static final int TRANSACTION_TIMEOUT_LOWER_BOUND = 0;

    /**
     * Upper bound for transaction timeout
     */
    public static final int TRANSACTION_TIMEOUT_UPPER_BOUND = 600000;

    /**
     * Interval for statistic exactlyOnce metric info
     */
    public static final int CONSUME_STATUS_STATISTICS_INTERVAL_SECOND = 60;

    /**
     * Query timeout for echo query statement
     */
    public static final int QUERY_TIMEOUT_SECOND = 1;

    /**
     * Key for commitQps metric info
     */
    public static final String COMMITQPS_KEY = "commitQps";

    /**
     * Key for rollbackQps metric info
     */
    public static final String ROLLBACKQPS_KEY = "rollbackQps";

    /**
     * Key for averageProcessTime metric info
     */
    public static final String AVERAGEPROCESSTIME_KEY = "averageProcessTime";

    /**
     * Key for averagePersistenceTime metric info
     */
    public static final String AVERAGEPERSISTENCETIME_KEY = "averagePersistenceTime";

    /**
     * Key for totalForbidDuplication metric info
     */
    public static final String TOTALFORBIDDUPLICATION_KEY = "totalForbidDuplication";

    /**
     * Key for averageConsumeTime metric info
     */
    public static final String AVERAGECONSUMETIME_KEY = "averageConsumeTime";

    /**
     * Key for dbQueryExpired metric info
     */
    public static final String DB_QUERYEXPIRED_KEY = "dbQueryExpired";

    /**
     * Key for dbQueryAcked metric info
     */
    public static final String DB_QUERYACKED_KEY = "dbQueryAcked";

    /**
     * Key for dbQueryMsgIdCount metric info
     */
    public static final String DB_QUERYMSGIDCOUNT_KEY = "dbQueryMsgIdCount";

    /**
     * Key for dbInsertRecord metric info
     */
    public static final String DB_INSERTRECORD_KEY = "dbInsertRecord";

    /**
     * Key for dbDeleteRecord metric info
     */
    public static final String DB_DELETERECORD_KEY = "dbDeleteRecord";

    /**
     * Key for dbRead metric info
     */
    public static final String DB_READ_KEY = "dbRead";

    /**
     * Key for dbWrite metric info
     */
    public static final String DB_WRITE_KEY = "dbWrite";

    /**
     * Key for dbQueryExpiredRt metric info
     */
    public static final String DB_QUERYEXPIRED_RT_KEY = "dbQueryExpiredRt";

    /**
     * Key for dbQueryAckedRt metric info
     */
    public static final String DB_QUERYACKED_RT_KEY = "dbQueryAckedRt";

    /**
     * Key for dbQueryMsgIdCountRt metric info
     */
    public static final String DB_QUERYMSGIDCOUNT_RT_KEY = "dbQueryMsgIdCountRt";

    /**
     * Key for dbInsertRecordRt metric info
     */
    public static final String DB_INSERTRECORD_RT_KEY = "dbInsertRecordRt";

    /**
     * Key for dbDeleteRecordRt metric info
     */
    public static final String DB_DELETERECORD_RT_KEY = "dbDeleteRecordRt";

    /**
     * Separator for internal message id
     */
    public static final String INTERNAL_MSGID_SEPARATOR = "#";

    /**
     * Splitor for dataSource key
     */
    public static final char DATASOURCE_KEY_SPLITOR = (char)1;

    /**
     * Prefix for exactly-once log
     */
    public static final String EXACTLYONCELOG_PREFIX = "ExactlyOnce ";
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy