-
Notifications
You must be signed in to change notification settings - Fork 316
Open
Description
没有认为设置contextName时,使用呢默认的:Constants.CONTEXT_DEFAULT_NAME(sentinel_default_context)
if (context == null) { // Using default context. context = InternalContextUtil.internalEnter(Constants.CONTEXT_DEFAULT_NAME); }
如下图在NodeSelectorSlot中,通过context.getName()获取DefaultNode
` DefaultNode node = map.get(context.getName());
if (node == null) {
synchronized (this) {
node = map.get(context.getName());
if (node == null) {
node = new DefaultNode(resourceWrapper, null);
HashMap<String, DefaultNode> cacheMap = new HashMap<String, DefaultNode>(map.size());
cacheMap.putAll(map);
cacheMap.put(context.getName(), node);
map = cacheMap;
// Build invocation tree
((DefaultNode) context.getLastNode()).addChild(node);
}
}
}
context.setCurNode(node);
fireEntry(context, resourceWrapper, node, count, prioritized, args);`
Metadata
Metadata
Assignees
Labels
No labels
