自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (2)
  • 收藏
  • 关注

转载 LinkedBlockingQueue vs ConcurrentLinkedQueue

LinkedBlockingQueue is intended for use cases when consumers and producersconcurrently consume and produce. In this case, for example the consumers might get ahead of producers and empty the queue

2014-05-30 14:10:04 599

转载 Does Java pass by reference or pass by value?

Q: If Java uses the pass-by reference, why won't a swap function work? A: Java does manipulate objects by reference, and all object variables are references. However, Java doesn't pass method argumen

2014-05-23 18:17:42 612

原创 How to create different types of thread pool in Java

It is easier to create thread pool by using java.util.concurrent.Executors. /** * Creates a thread pool that reuses a fixed number of threads * operating off a shared unbounded queue.

2014-05-08 16:56:58 760

原创 A better way to shutdown the thread pool in Java

The following method shuts down an ExecutorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks: vo

2014-05-08 15:07:15 467

转载 When to use AtomicReference?

Atomic reference should be used in a setting where you need to do simple atomic (i.e., thread safe, non-trivial) operations on a reference, for which monitor-based synchronization is not appropriate.

2014-05-08 14:17:53 469

转载 What is a race condition?

A race condition occurs when two or more threads can access shared data and they try to change it at the same time. Because the thread scheduling algorithm can swap between threads at any time, you do

2014-05-08 10:57:58 723

转载 When and how should I use a ThreadLocal variable?

One possible (and common) use is when you have some object that is not thread-safe, but you want to avoid synchronizing access to that object (I'm looking at you,SimpleDateFormat). Instead, give eac

2014-05-07 15:33:24 459

HTTP1.1(English).pdf

HTTP1.1(English).pdf

2015-06-09

HTTP1.1 Protocol

Http1.1 Protocol介绍HTTP1.1的协议的介绍,值得一看。

2015-03-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除