- 博客(19)
- 收藏
- 关注
转载 think in java - annotation
# what's annotation, why we need annotation? - metadata - to combine metadata with source code files. - help to ease the burden of writing boile...
2014-07-04 15:10:00
97
转载 think in java -Enum
# enumShrubbery{GROUND,CRAWLING,HANGING} publicstaticvoidmain(String[]args){for(Shrubberys:Shrubbery.values()){...
2014-07-04 13:41:00
87
转载 think in java - IO - object serialization
# why we need object serialization? - There are situations in which it would be incredibly useful if an object could exist and hold its informatio...
2014-07-03 11:31:00
110
转载 think in java - I/O - NIO
# what's NIO It's intriduced in JDK 1.4, has one goal: speed! Rapidly moving large amounts of data. Actually, the 'old IO' have been reimplemente...
2014-07-03 10:49:00
81
转载 JCP - Applying thread pool
# sizing thread pool Thread pool size should rarely be hard-coded, instead it should be provided by configuration mechanism or computed dynamicall...
2014-07-01 11:17:00
55
转载 CIP - avoid liveness hazards
We use lock to ensure thread safety, but indiscriminate use of locking can cause lock-ordering deadlocks. # deadly embrace When thread ...
2014-07-01 10:08:00
121
转载 think in java - io - RandomAccessFile
# when to use RandomAccessFile? It is used for files containing records of known size so that you can move from one record to another using seek(...
2014-06-30 18:00:00
80
转载 think in java - io - reader/writer
# what's difference between InputSteam/OutputStream and Reader/Writer? The inputStream and outputStram classes provide functionalities in the form...
2014-06-30 17:02:00
110
转载 think in java - io - input/output
# what is 'stream'? Stream represents any data source or sink as an object capable of producing or receiving pieces of data. #inputStream To p...
2014-06-30 16:50:00
89
转载 think in java - IO - file
# what does 'File path = new File(".");' mean? project root path # how to see a directory listing? list(): return String[] list(Filename...
2014-06-30 14:38:00
118
转载 think in java - concurrency - interruption
why we need interruption? if run() method blocked, we want to break out of it, we can use Thread.interrupt() to terminate this task. # interrup...
2014-06-26 10:28:00
77
转载 think in java - concurrency - ThreadLocal
ThreadLocal storage is a mechanism that automatically creates different storage for each different thread. privatestaticThreadLocal<Integer&g...
2014-06-25 16:51:00
71
转载 think in java - concurrency - Atomicity
# what is atomic operation? atomic operations are not interrupted by the threading mechanism. (context switch) hence, we can take advantage of th...
2014-06-25 15:49:00
78
转载 think in java - concurrency - Callable
# When to use Callable? If you want the task to produce a value when it's done. publicclassCallableDemo{ publicstaticvoidmain(String[]arg...
2014-06-25 13:33:00
68
转载 think in java - concurrency - Executors
what is Executors? java.util.concurrent.Executors simplify concurrent programing by managing Thread objects for you. It allows you to manage the e...
2014-06-25 11:47:00
83
转载 think in java - concurrency - task && thread
define a task: publicclassLiftOffimplementsRunnable{ protectedintcountDown=10; @Override publicvoidrun(){ while(/*taskiss...
2014-06-25 11:13:00
65
转载 ActiveMQ - performance tuning - general
What's delivery mode, which one is the default? - The JMS spec allows for 2 delivery modes: persistent and non-persistent, the default mode is per...
2014-06-20 14:40:00
132
转载 ActiveMQ - Caching
Why we want to persist messages? - There are a number of cases where messages are required to be available for consumers that were disconnected f...
2014-06-20 10:26:00
86
转载 share_hadoop_mapreduce
MapReduce explained in 41 words author: Chris Stucchio Goal: count the number of books in thelibrary. Map: You count up shelf #1, I count up s...
2014-03-28 09:55:00
118
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人