上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 84 下一页
摘要: 工作原理 1、线程池刚创建时,里面没有一个线程。任务队列是作为参数传进来的。不过,就算队列里面有任务,线程池也不会马上执行它们。 2、当调用 execute() 方法添加一个任务时,线程池会做如下判断: a. 如果正在运行的线程数量小于 corePoolSize,那么马上创建线程运行这个任务; b. 阅读全文
posted @ 2017-08-17 15:03 穆穆兔兔 阅读(5721) 评论(0) 推荐(0) 编辑
摘要: 一、概述 MyBatis中在查询进行select映射的时候,返回类型可以用resultType,也可以用resultMap,resultType是直接表示返回类型的,而resultMap则是对外部ResultMap的引用,但是resultType跟resultMap不能同时存在。 在MyBatis进 阅读全文
posted @ 2017-08-16 17:52 穆穆兔兔 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 这里做了比较清晰的解释: http://mybatis.github.io/mybatis-3/java-api.html SqlSessionAs mentioned above, the SqlSession instance is the most powerful class in MyBa 阅读全文
posted @ 2017-08-16 16:30 穆穆兔兔 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 设置 IP和 端口号,这里会自动生成debug 参数 启动参数的含义可以看这个文章 https://www.ibm.com/developerworks/cn/opensource/os-eclipse-javadebug/index.html 阅读全文
posted @ 2017-08-16 14:28 穆穆兔兔 阅读(242) 评论(0) 推荐(0) 编辑
摘要: http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html http://freish.iteye.com/blog/1008304 双重检查锁定在延迟初始化的单例模式中见得比较多(单例模式实现方式很多,这里为说明双重 阅读全文
posted @ 2017-08-12 11:35 穆穆兔兔 阅读(804) 评论(0) 推荐(0) 编辑
摘要: java.lang.Void is analogous to java.lang.Integer. Integer is a way of boxing values of the primitive type int. Void is a way of boxing values of the p 阅读全文
posted @ 2017-08-11 17:03 穆穆兔兔 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 转 http://www.jianshu.com/p/6f3ee90ab7d3 CompletableFuture类实现了CompletionStage和Future接口。Future是Java 5添加的类,用来描述一个异步计算的结果,但是获取一个结果时方法较少,要么通过轮询isDone,确认完成后 阅读全文
posted @ 2017-08-11 16:48 穆穆兔兔 阅读(503) 评论(0) 推荐(0) 编辑
摘要: http://blog.jrwang.me/2016/java-thread-states/ 发表于 2016-07-23 在 Java 多线程编程中,sleep(), interrupt(), wait(), notify() 等方法是非常基本也很常用的方法。这些方法会改变运行中的 Java 线程 阅读全文
posted @ 2017-08-11 11:43 穆穆兔兔 阅读(398) 评论(0) 推荐(0) 编辑
摘要: CyclicBarrier是什么 CyclicBarrier也叫同步屏障,在JDK1.5被引入,可以让一组线程达到一个屏障时被阻塞,直到最后一个线程达到屏障时,所以被阻塞的线程才能继续执行。CyclicBarrier好比一扇门,默认情况下关闭状态,堵住了线程执行的道路,直到所有线程都就位,门才打开, 阅读全文
posted @ 2017-08-10 15:08 穆穆兔兔 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-08-10 14:36 穆穆兔兔 阅读(130) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 84 下一页