加载中
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 boilerplate code. # define annotation ...

2014/07/04 15:10
23
think in java -Enum

# enum Shrubbery {     GROUND, CRAWLING, HANGING }    public static void main(String[] args) {     for (Shrubbery s : Shrubbery.values()) {         ...

2014/07/04 13:41
52
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 information even when the program isn't r...

2014/07/03 11:31
23
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 reimplemented using NIO. # why NIO is fast? ...

2014/07/03 10:49
19
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 dynamically. If size 'too big', threads c...

2014/07/01 11:17
10
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 A holds lock L and try to acquire lock M, ...

2014/07/01 10:08
36
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(). # sth RAF has no association ...

2014/06/30 18:00
6
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 of byte-oriented I/O, whereas ...

2014/06/30 17:02
5
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 produce input from different sources...

2014/06/30 16:50
5
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(FilenameFilter) class DirFilter implements Fil...

2014/06/30 14:38
6
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. # interrupt() set interrupted status. [1] if...

2014/06/26 10:28
30
think in java - concurrency - ThreadLocal

ThreadLocal storage is a mechanism that automatically creates different storage for each different thread. private static ThreadLocal<Integer> value = new ThreadLocal<Int...

2014/06/25 16:51
26
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 this to write lock-free code which...

2014/06/25 15:49
10
think in java - concurrency - Callable

# When to use Callable? If you want the task to produce a value when it's done. public class CallableDemo {   public static void main(String[] args) {     ExecutorService ...

2014/06/25 13:33
8
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 execition of asynchronous tasks ...

2014/06/25 11:47
9
think in java - concurrency - task && thread

define a task: public class LiftOff implements Runnable {      protected int countDown = 10;      @Override   public void run() {     while (/* task is still necessary...

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 persistent. Why non-peristent mode...

2014/06/20 14:40
116
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 from the broker, so we want these...

2014/06/20 10:26
14
share_hadoop_mapreduce

it's abt the explaination of mapreduce in hugely concise way.

2014/03/28 09:55
9

没有更多内容

加载失败,请刷新页面

没有更多内容

返回顶部
顶部