Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2532528
  • 博文数量: 245
  • 博客积分: 4125
  • 博客等级: 上校
  • 技术积分: 3113
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-25 23:56
文章分类

全部博文(245)

文章存档

2015年(2)

2014年(26)

2013年(41)

2012年(40)

2011年(134)

2010年(2)

发布时间:2014-09-13 13:26:38

使用Maven 2.2.1 build 项目mvn clean install -Dmaven.test.skip=truemvn clean install -DskipTests......【阅读全文】

阅读(1187) | 评论(0) | 转发(0)

发布时间:2014-07-01 10:08:33

线程同步Synchronization线程就像图书借阅者,线程从资源池中借资源。线程通过共享内存、文件处理、sockets和其他资源让程序更加高效。只要两个线程不想同时使用相同的资源,多线程比多进程更高效,因为每个进程需要keep its own copy of every resource。多线程的缺点是:如果两个线程同时想要得到相同的资源时,其.........【阅读全文】

阅读(5028) | 评论(0) | 转发(2)

发布时间:2014-06-30 13:31:01

当多个线程同时运行(可以同时运行)时,需要考虑线程调度的问题。确保所有重要的线程有运行的时间,越重要的线程获得更多的运行时间。优先级Priorities每个线程在创建时都有一个优先级,值为0到10。当多个线程准备好运行时,VM通常会先run优先级高的。java中10是最高优先级,0是最低优先级,5是默认的。public .........【阅读全文】

阅读(1738) | 评论(0) | 转发(0)

发布时间:2014-06-15 10:50:00

Define an interface, and implement it in the class that will receive the callback.Have attention to the multi-threading in your case.Code example from  http://phpcode8.com/java/%E5%A4%9A%E7%BA%BF%E7%A8%8B/java-callback.htmlinterface CallBack { void methodToCallBack();}class C.........【阅读全文】

阅读(1398) | 评论(0) | 转发(0)

发布时间:2014-06-15 10:48:19

实现序列号接口(Serializable),标记这个类可以被序列化。 “I’m fine to be serialized”.当你尝试序列化没有实现Serializable接口的对象时,将会抛出异常 NotSerializableException.The idea is to be able to transparently serialize instances of the class – potentially for caching or other purpose.........【阅读全文】

阅读(1386) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

甜心1832013-07-24 18:45

大牛级人物,膜拜

回复  |  举报

ansnq8572013-04-03 13:12

好好学习,天天向上

回复  |  举报

大鬼不动2010-08-09 00:57

回复  |  举报
留言热议
请登录后留言。

登录 注册