...上篇文章说到,MongoDB的网络通讯协议流程。拿到请求对象后,会调用assemblyResonse函数处理。这部分的代码实在没什么章法可言, if-else 遍地,实在不怎么优雅。可以感受到随着需求的增长,很多代码都是硬套上去的。本篇介绍的是基本的处理请求,基本请求所指的是command命令以外的处理行为。 assembleResponse 首先,获取到线程绑定(ThreadLocal)Client对象,并对权限模块初始化,更新Auth Cache中过期或者失效的权限信息。然后,根据配置记录diaglog;接着统计操作计数器。
基于6个网页-相关网页
例如,您可以将线程绑定到给定的处理器,以找出导致某个挂起程序的根源。
For example, you can bind threads to a given processor to find the root cause of a hanging program.
bindprocessor命令可以将进程中的内核线程绑定到一个处理器,或取消这种绑定。
The bindprocessor command binds or unbinds the kernel threads of a process to a processor.
此外该模板知道线程绑定的会话,这个会话可以跨几个方法使用,这在使用事务型仓库时非常有用。
Moreover the template is aware of thread-bound sessions which can be used across several methods, functionality very useful when using a transactional repository.
应用推荐