关于java concurrenthashmap替换方法的问题(Question about java concurrenthashmap replace method)
我有以下代码
public class Test{ private static final String key = "key"; public static void main(String[] a){ ConcurrentHashMap<String,String > map = new ConcurrentHashMap<String,String>(); System.out.println(map.replace(key,"1")); System.out.println(map.replace(key,"2")); } }
输出两次都为null。 它不应该是1秒钟吗?
I have the following code
public class Test{ private static final String key = "key"; public static void main(String[] a){ ConcurrentHashMap<String,String > map = new ConcurrentHashMap<String,String>(); System.out.println(map.replace(key,"1")); System.out.println(map.replace(key,"2")); } }
The output is null both times. Isn't it supposed to be 1 second time?
原文:https://stackoverflow.com/questions/4949615
最满意答案
我同意,这没有意义。 根据我对TOGAF的理解,应该“回到建筑工作要求的发起者”。
正如您自己注意到的那样,架构工作声明不是输入,而是A阶段的输出。另一方面,建筑工作请求是一个输入,应该包含业务目标。
I agree, this does not make sense. To my understanding of TOGAF, it should be "go back to the originators of the Request for Architecture Work".
As you noticed yourself, the Statement of Architecture Work is not an input, but an output of phase A. The Request for Architecture Work on the other hand is an input and should contain the business goals.
相关问答
更多-
mastercam9.1免费PDF教程[2022-04-09]
http:// www.2wedm.cn/thread-2498-1-1.html这是论坛网上的,你要随便注册一下就可以下载了 -
尝试手动编辑Makefile.config并更改这些行 # CUDA architecture setting: going with all of them. # For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility. # For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility. # For CUDA >= 9.0, comment the *_ ...
-
架构存储库包含ADM迭代执行的内容等。 外部参考体系结构,标准等更多。体系结构存储库本身不是可交付的,因为它是建立体系结构功能时的物理实现。 审查TOGAF世界中的可交付成果并签名工件和工件可以是图表,目录或矩阵。 Architecture repository holds content from the execution of ADM iterations and more. The more is external reference architectures, standards etc. Ar ...
-
根据Togaf 9的Togaf文档: 体系结构1.系统的正式描述或组件级别的详细计划,以指导其实施(来源:ISO / IEC 42010:2007)。 2.组件的结构,它们之间的相互关系以及管理它们随着时间的推移而设计和发展的原则和指导方针。 它没有提供解决方案的正式定义。 通俗地说,建筑是一个抽象的解决方案。 它可以是一个超集或一组解决方案。 解决方案是一个更具体的问题表示,而体系结构代表更广泛的系统图景。 As Per Togaf Documentation for Togaf 9: Architect ...
-
如果你不必使用tensorflow 1.7, 这个仓库可能有你想要的。 只是要清楚,我从来没有尝试过任何一个。 如果您需要在Windows上安装, 此存储库可能会有所帮助。 If you don't have to use tensorflow 1.7, this repository might have what you want. Just to be clear, I never tried any of them myself. If you need to install on Windows, ...
-
我建议阅读Eric Evans的“Domain-Driven Design”和Vaughn Vernon的“实现领域驱动设计”。 首先要意识到的不是建立一个统治全部的大模型。 DDD是关于域(其中之一是核心域)和子域。 它是关于有限的上下文,可以通过书中描述的各种方式进行连接。 所以基本上你会得到很多自主子系统,看起来有多余的数据,它们以松散耦合的方式相互通信,并将部分数据与松散耦合的通信同步。 许多最重要的限制只会最终保持一致,系统,流程和用户必须容忍这一点。 因此,在您描述的复杂性的情况下,我认为是。 ...
-
阶段B到阶段D包括为每个体系结构域定义基线和目标体系结构,并确定基线和目标之间的差距。 在D阶段结束时,您应该有四组架构定义和四组缺口分析。 阶段E涉及将已识别的差距合并到工作包中。 这些集体是机会。 基线(当前)体系结构和目标(未来)体系结构之间的差距是机会。 然后,您将这些要求纳入路线图并草拟实施计划,这就是解决方案要素。 希望能帮助到你。 Phases B through D involve defining the baseline and target architectures for each ...
-
Togaf 9.1架构愿景 -(Togaf 9.1 architecture Vision -)[2022-09-20]
我同意,这没有意义。 根据我对TOGAF的理解,应该“回到建筑工作要求的发起者”。 正如您自己注意到的那样,架构工作声明不是输入,而是A阶段的输出。另一方面,建筑工作请求是一个输入,应该包含业务目标。 I agree, this does not make sense. To my understanding of TOGAF, it should be "go back to the originators of the Request for Architecture Work". As you not ... -
Ubuntu不再维护PL / JAVA包。 您提到的软件包使用的是旧版本的PL / JAVA,具体取决于gcj。 强烈建议使用PL / JAVA 1.5.0版,使用最新的Oracle或OpenJDK java版本。 悲伤的消息是你必须自己建造它。 有关说明,请参阅 https://tada.github.io/pljava/build/build.html (建筑物) https://tada.github.io/pljava/install/install.html (安装) There is no ma ...
-
我通过从项目中删除libCommonCrypto.dylib,libz.dylib并将security.framework,javascript.framework添加到项目中解决了这个问题。 I have solved this problem by removing libCommonCrypto.dylib,libz.dylib from project and adding security.framework, javascript.framework to the project.