- 博客(12)
- 资源 (4)
- 收藏
- 关注
原创 在线服务的内存泄露问题
最近发现一台机器堆内存使用率大约100%,Web server相应极慢,导致客户端多次报告Read Timeout. 跟踪Resin的jvm-default log,发现已经持续告警:[15-11-13 09:48:57.864] {CoordinatorThread[]-3} AlarmClock slow alarm Alarm[alarm[WebAppExpandDeployGenerat
2015-11-16 16:59:54 1317
原创 JVM能够开启多少线程
JVM可创建的最大线程数量和线程栈大小(通过-Xss或stack size指定,一般为0.5M-1M)、可用内存和操作系统限制有关系。因此本文讨论一下,究竟JVM最多能够开启多少线程。
2015-11-11 21:21:01 7562
原创 为何需要定制化的Thread Factory?
当我们提交任务到Executor框架中时,一个线程会负责执行该任务。该线程有可能从线程池中分配,也有可能是按需创建。每一个Executor都对应一个ThreadFactory。如果我们在创建Executor的时候没有明确知道指定ThreadFactory,那么Executor会使用缺省的ThreadFactory.
2015-11-26 16:19:20 4817
原创 Ubuntu 12.10 中增加Eclipse图标到启动器
在启动器里面的快捷方式可以通过从Dash拖动过来。1. Dash中的程序来自于 /usr/share/applications cd /usr/share/applications2. sudo gedit eclipse.desktop[Desktop Entry]Name=EclipseComment=Eclipse IDEE
2013-11-09 15:48:15 465
原创 Process vs Thread
进程(Process):A:An instance of a program.即一个程序的运行实例。B: Executed in own address space.有独立的地址空间,包括程序内容和数据C: Independent entity to which system assigns resources。进程是资源分配和拥有的单位.D:Cannot access varia
2013-07-01 23:34:55 800
原创 Java Collections Framework(4) Set
1. A set is a collection that contains no duplicate elements. More formally, sets contain no pair of elements e1 and e2 such that e1.equals(e2) , and at most one null elements.2. Some Set implementa
2013-06-23 14:23:21 585
原创 Java Collections Framework(3) Map
1.A Map is an object that maps keys to values. A map cannot contain duplicate keys, each key can at most map to one value.2.Map iuterface provides three collection views , which allow a map's conte
2013-06-23 13:56:26 559
原创 Java Collections Framework(2) -List
List:a List is an ordered collection, and unlike a set, the list typically allow duplicate elements.ArrayList1.内部通过数组实现,允许对元素进行快速随机访问,缺点是每个元素之间不能有间隔,需要有一个连续的内存空间,当capacity不足够时,需要将已有的数据复制到新
2013-06-18 22:24:52 482
原创 Static Binding versus Dynamic Binding
所谓“绑定(binding)”,是指建立method call(函数调用)和method body(函数本体)的关联。一切方法调用(method call)在Class文件中存储的都是一个常量池中的符号引用,而不是方法在实际运行时内存布局中的入口地址(也就是直接引用)。分为前期绑定和后期绑定。1)前期绑定(Early Binding):在程序运行之前绑定,由编译器和连接程序实现,又叫静态绑
2013-06-16 12:23:51 808
原创 Java基本特性(1)-Polymorphism: 论多态
The dictionary definition of polymorphism refer to a principle in biology in which an organism or species can have many different forms or stages. This principles can also applied to Object-Oriented p
2013-06-15 00:53:00 665
原创 Java Collections Framework(1) Collection Interface
CollectionDescription:1)The root interface in the collection hierarchy. Acollectionrepresents a group of objects, known as its elements.2) Some collection allow duplicate elements and others
2013-06-13 23:43:51 518
原创 The Methods of class Object
近日稍感空闲,温习一下基础知识,时刻准备着,等待7.27的到来。Class Object is the root of the class hierarchy , Every class has Object as a superest class. All objects, including arrays, implement the methods of this class.
2013-06-07 23:42:11 632
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人