类 EmbeddedStorageContextUtils


  • public class EmbeddedStorageContextUtils
    extends java.lang.Object
    Temporarily saves all insert, update, and delete statements under a transaction in the order in which they occur.
    作者:
    liaochuntao
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      private static java.lang.ThreadLocal<java.util.Map<java.lang.String,​java.lang.String>> EXTEND_INFO_CONTEXT  
      private static java.lang.ThreadLocal<java.util.ArrayList<ModifyRequest>> SQL_CONTEXT  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static void addSqlContext​(java.lang.String sql, java.lang.Object... args)
      Add sql context.
      static void cleanAllContext()  
      static boolean containsExtendInfo​(java.lang.String key)
      Determine if key is included.
      static java.util.Map<java.lang.String,​java.lang.String> getCurrentExtendInfo()  
      static java.util.List<ModifyRequest> getCurrentSqlContext()  
      static void onBatchDeleteConfigInfo​(java.util.List<ConfigInfo> configInfos)
      In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
      static void onDeleteConfigBetaInfo​(java.lang.String namespaceId, java.lang.String group, java.lang.String dataId, long time)
      In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
      static void onDeleteConfigInfo​(java.lang.String namespaceId, java.lang.String group, java.lang.String dataId, java.lang.String srcIp, java.sql.Timestamp time)
      In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
      static void onDeleteConfigTagInfo​(java.lang.String namespaceId, java.lang.String group, java.lang.String dataId, java.lang.String tag, java.lang.String srcIp)
      In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
      static void onModifyConfigBetaInfo​(ConfigInfo configInfo, java.lang.String betaIps, java.lang.String srcIp, java.sql.Timestamp time)
      In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
      static void onModifyConfigInfo​(ConfigInfo configInfo, java.lang.String srcIp, java.sql.Timestamp time)
      In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
      static void onModifyConfigTagInfo​(ConfigInfo configInfo, java.lang.String tag, java.lang.String srcIp, java.sql.Timestamp time)
      In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
      static void putAllExtendInfo​(java.util.Map<java.lang.String,​java.lang.String> map)
      Put all extend info.
      static void putExtendInfo​(java.lang.String key, java.lang.String value)
      Put extend info.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • SQL_CONTEXT

        private static final java.lang.ThreadLocal<java.util.ArrayList<ModifyRequest>> SQL_CONTEXT
      • EXTEND_INFO_CONTEXT

        private static final java.lang.ThreadLocal<java.util.Map<java.lang.String,​java.lang.String>> EXTEND_INFO_CONTEXT
    • 构造器详细资料

      • EmbeddedStorageContextUtils

        public EmbeddedStorageContextUtils()
    • 方法详细资料

      • addSqlContext

        public static void addSqlContext​(java.lang.String sql,
                                         java.lang.Object... args)
        Add sql context.
        参数:
        sql - sql
        args - argument list
      • putExtendInfo

        public static void putExtendInfo​(java.lang.String key,
                                         java.lang.String value)
        Put extend info.
        参数:
        key - key
        value - value
      • putAllExtendInfo

        public static void putAllExtendInfo​(java.util.Map<java.lang.String,​java.lang.String> map)
        Put all extend info.
        参数:
        map - all extend info
      • onModifyConfigInfo

        public static void onModifyConfigInfo​(ConfigInfo configInfo,
                                              java.lang.String srcIp,
                                              java.sql.Timestamp time)
        In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
        参数:
        configInfo - ConfigInfo
        srcIp - The IP of the operator
        time - Operating time
      • onModifyConfigBetaInfo

        public static void onModifyConfigBetaInfo​(ConfigInfo configInfo,
                                                  java.lang.String betaIps,
                                                  java.lang.String srcIp,
                                                  java.sql.Timestamp time)
        In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
        参数:
        configInfo - ConfigInfo
        betaIps - Receive client IP for grayscale configuration publishing
        srcIp - The IP of the operator
        time - Operating time
      • onModifyConfigTagInfo

        public static void onModifyConfigTagInfo​(ConfigInfo configInfo,
                                                 java.lang.String tag,
                                                 java.lang.String srcIp,
                                                 java.sql.Timestamp time)
        In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
        参数:
        configInfo - ConfigInfo
        tag - tag info
        srcIp - The IP of the operator
        time - Operating time
      • onDeleteConfigInfo

        public static void onDeleteConfigInfo​(java.lang.String namespaceId,
                                              java.lang.String group,
                                              java.lang.String dataId,
                                              java.lang.String srcIp,
                                              java.sql.Timestamp time)
        In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
        参数:
        namespaceId - namespaceId
        group - groupName
        dataId - dataId
        srcIp - The IP of the operator
        time - Operating time
      • onBatchDeleteConfigInfo

        public static void onBatchDeleteConfigInfo​(java.util.List<ConfigInfo> configInfos)
        In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
        参数:
        configInfos - ConfigInfo list
      • onDeleteConfigBetaInfo

        public static void onDeleteConfigBetaInfo​(java.lang.String namespaceId,
                                                  java.lang.String group,
                                                  java.lang.String dataId,
                                                  long time)
        In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
        参数:
        namespaceId - namespaceId
        group - group
        dataId - dataId
        time - Operating time
      • onDeleteConfigTagInfo

        public static void onDeleteConfigTagInfo​(java.lang.String namespaceId,
                                                 java.lang.String group,
                                                 java.lang.String dataId,
                                                 java.lang.String tag,
                                                 java.lang.String srcIp)
        In the case of the in-cluster storage mode, the logic of horizontal notification is implemented asynchronously via the raft state machine, along with the information.
        参数:
        namespaceId - namespaceId
        group - group
        dataId - dataId
        tag - tag info
        srcIp - The IP of the operator
      • containsExtendInfo

        public static boolean containsExtendInfo​(java.lang.String key)
        Determine if key is included.
        参数:
        key - key
        返回:
        true if contains key
      • getCurrentSqlContext

        public static java.util.List<ModifyRequest> getCurrentSqlContext()
      • getCurrentExtendInfo

        public static java.util.Map<java.lang.String,​java.lang.String> getCurrentExtendInfo()
      • cleanAllContext

        public static void cleanAllContext()