类 EmbeddedStorageContextUtils
- java.lang.Object
-
- com.alibaba.nacos.config.server.service.sql.EmbeddedStorageContextUtils
-
public class EmbeddedStorageContextUtils extends java.lang.ObjectTemporarily 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_CONTEXTprivate static java.lang.ThreadLocal<java.util.ArrayList<ModifyRequest>>SQL_CONTEXT
-
构造器概要
构造器 构造器 说明 EmbeddedStorageContextUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static voidaddSqlContext(java.lang.String sql, java.lang.Object... args)Add sql context.static voidcleanAllContext()static booleancontainsExtendInfo(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 voidonBatchDeleteConfigInfo(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 voidonDeleteConfigBetaInfo(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 voidonDeleteConfigInfo(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 voidonDeleteConfigTagInfo(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 voidonModifyConfigBetaInfo(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 voidonModifyConfigInfo(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 voidonModifyConfigTagInfo(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 voidputAllExtendInfo(java.util.Map<java.lang.String,java.lang.String> map)Put all extend info.static voidputExtendInfo(java.lang.String key, java.lang.String value)Put extend info.
-
-
-
字段详细资料
-
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
-
-
方法详细资料
-
addSqlContext
public static void addSqlContext(java.lang.String sql, java.lang.Object... args)Add sql context.- 参数:
sql- sqlargs- argument list
-
putExtendInfo
public static void putExtendInfo(java.lang.String key, java.lang.String value)Put extend info.- 参数:
key- keyvalue- 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-ConfigInfosrcIp- The IP of the operatortime- 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-ConfigInfobetaIps- Receive client IP for grayscale configuration publishingsrcIp- The IP of the operatortime- 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-ConfigInfotag- tag infosrcIp- The IP of the operatortime- 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- namespaceIdgroup- groupNamedataId- dataIdsrcIp- The IP of the operatortime- 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-ConfigInfolist
-
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- namespaceIdgroup- groupdataId- dataIdtime- 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- namespaceIdgroup- groupdataId- dataIdtag- tag infosrcIp- The IP of the operator
-
containsExtendInfo
public static boolean containsExtendInfo(java.lang.String key)
Determine if key is included.- 参数:
key- key- 返回:
trueif 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()
-
-