Please enable JavaScript.
Coggle requires JavaScript to display documents.
Java - Coggle Diagram
Java
-
JMM
先行发生原则
volatile 变量值被一个线程修改后会立即同步回主内存、变量值被其他线程读取前立即从主内存刷新值到工作内存。即read、load、use三者连续顺序执行,assign、store、write连续顺序执行
-
Lock, read, load, use, assign, store, write, unlock
-
Database
-
Isolation Levels
Read uncommitted (0)
Locks are obtained on modifications to the database and held until end of transaction (EOT). Reading from the database does not involve any locking.
Read committed (1)
Locks are acquired for reading and modifying the database. Locks are released after reading but locks on modified objects are held until EOT.
Repeatable read (2)
Locks are obtained for reading and modifying the database. Locks on all modified objects are held until EOT. Locks obtained for reading data are held until EOT. Locks on non-modified access structures (such as indexes and hashing structures) are released after reading.
Serializable (3)
All data read or modified is locked until EOT. All access structures that are modified are locked until EOT. Access structures used by the query are locked until EOT.
-
-
Thread
Life Cycle
Blocked: Thread state for a thread blocked waiting for a monitor lock. A thread in the blocked state is waiting for a monitor lock to enter a synchronized block/method or reenter a synchronized block/method after calling Object.wait().
Waiting: Thread state for a waiting thread. A thread is in the waiting state due to calling one of the following methods.
A thread in the waiting state is waiting for another thread to perform a particular action.
-
-
-
Runnable: Thread state for a runnable thread. A thread in the runnable state is executing in the Java virtual machine but it may be waiting for other resources from the operating system such as processor.
Timed Waiting: Thread state for a waiting thread with a specified waiting time. A thread is in the timed waiting state due to calling one of the following methods with a specified positive waiting time:
-
-
-
-
-
-
-
-