`
lixjluck
  • 浏览: 101687 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
前言 前些天做项目的性能对比测试,发现新的性能比之前的性能下降了很多,百思不得其解;多方磨难,最后定位到我们使用了DBCP的connection pool,没有打开prepareStatement Cache,打开后,性能就上来了; 老的项目是使用c3p0,里面是使用到了prepareStatement Cache。   正文 今天有空,研究下mysql jdbc driver的实现,发现它内部也做了prepareStatement cache,而且还分server 和 client之分 Server 这里指的是Mysql db server做sql的解析,并返回给jdbc cl ...
http://m.weather.com.cn/data/101210101.html   中国天气提供的内部API,后面的ID还未知具体规则 返回的数据格式为json;
问题 常见一个门面实现类,融合了N多的if/else,遂抽取了这种设计模式   类图  伪代码 //Facade public void process(String key, Object...){ DataHandler handler = dataHandlerFactory.factory(key); if (handler != null) { try { handler.handle(memberId, obj); } catch (Except ...
    我们都知道Terracotta收购了EhCache,同时推出了基于off-heap技术的bigMemory,从而摆脱JVM GC带来的性能问题;      就Java 本地Cache(非分布式)而言,存在3个地方可以存放数据:Heap, OffHeap和Disk              BigMemory非开源产品,所以其源码不能通过正常渠道拿到。       同时,有一个开源产品DirectMemory实现了类似BigMemory的Cache实现,       https://github.com/raffaeleguidi/DirectMemory         它 ...
  java.nio.Buffer    属性   mark   position limit 一般情况下limit==catacity capacity 此属性一经设置,就不会改变 remaing limit-position address     查询类方法   remaining  limit - position;  hasRemaining limit < position;     改变类方法   mark mark=position; reset posi ...

mvn创建工程模板

创建模板工程 手工创建 已有工程创建   mvn archetype:create-from-project 然后到当前目前下的target/generated-sources/archetype寻找创建好的身影   如果无需修改任何东西,则 mvn install   最后在你要新建工程的目录下 mvn archetype:generate -DarchetypeCatalog=local 在提示下完成工程创建   或者已经存在模板,通过 mvn archetype:generate -B -DarchetypeGroupId=org.apache.ma ...
      SO_LINGER Specify a linger-on-close timeout. This option disables/enables immediate return from a close()of a TCP Socket.  Enabling this option with a non

20110810

文武之道,一张一弛   java se6 性能改进   偏向锁 锁粗化 自适应旋转     Detecting Contention • IDEs, Profilers or 3rd party tools • Mpstat on Solaris – vctx rate • If suspected, sample process with pstack > Look near top of stack for threads blocked in monitorenter operations • JVMStat (jstat) counters > ...

20110809

The maximum heap size of a Java application is limited by three factors 1、the process data model (32-bit or 64-bit) and the associated operating system limitations(what?) 2、the amount of virtual memory available on the system 3、the amount of physical memory available on the system   Committin ...

20110806

IO    写道 Disk latency is around 13ms, but it depends on the quality and rotational speed of the hard drive. RAM latency is around 83 nanoseconds.     性能指标 IOPS (input/output operations per-second) iowait    写道 If your I/O wait percentage is greater than (1/# of CPU cores) then your C ...

20110802

Java & JVM 相关   买了一本书 ,深入理解java虚拟机 JMM jsr-133-faq  jdk7 source code: http://download.java.net/openjdk/jdk7/     分布式锁相关   拜占庭失效问题 Paxos算法, 分布式系统中消息传输一致性算法 两个具体实现 google chubby  http://news.cnblogs.com/n/86066/ zookeeper   其他   bigpipe研究  

20110801

java se 7 AIO的实现   windows基于IOCP(input/output Completion Port,I/O完成端口) 它是应用程序使用线程池处理异步I/O请求的一种机制.   linux基于epoll (EpollPort)   编程模型 AIO模型相对于之前的编程模型,更加简便,且把线程池隐藏在内部实现中。   服务器端   channelGroup = AsynchronousChannelGroup.withFixedThreadPool(Runtime.getRuntime().availableProcessors(), ...

20110731

java7 AIO 问题,是基于java concurrent Future+nio完成? 如AsynchronousSocketChannel,AsynchronousServerSocketChannel,  AsynchronousFileChannel   java7 自动资源关闭,实现AutoCloseable   Grizlly http://grizzly.java.net/   use byte buffer pool      

JAVA SE7 新特性

    博客分类:
  • java
IO http://openjdk.java.net/projects/nio/ add java.nio.file package Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems. The java.nio.file.spi.FileSystemProvider class allows you to develop a custom file system provider. A custom fi ...

20110729

java7 的特性 http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html   java7已经GA了   WTP3.3的dynamic web project的属性,和之前的版本不一样,而且还需要手工设置一下,默认的不生效。
Global site tag (gtag.js) - Google Analytics