1: Multithreading (understanding)
(1) JDK5 subsequent lock operations and release actions for threads
Lock locks
(2) Description and code representation of the deadlock problem
(3) Multi-threaded representation of producers and consumers (inter-thread communication issues)
With the students as the resources to achieve
Resource class: Student
Set data class: Setthread (producer)
Get Data class: GetThread (Consumer)
Test class: Studentdemo
Code:
A: The most basic version, only one data.
B: Improved version, given different data, and added synchronization mechanism
C: Wait for the wake-up mechanism to improve the program, so that the data can be implemented sequentially
Wait ()
Notify ()
Notifyall () (Multi-production and multi-consumption)
D: Code optimization waiting for the wake mechanism. The data and operations are written in the resource class.
(4) Thread Group
(5) thread pool
(6) Multi-threaded implementation of the third scenario
(7) Multi-threaded face test
2: Design pattern (understanding)
(1) Common design principles of interview objects
Single
Closing
Magnitude
Dependency Injection
Interface
Dimitri
(2) Design pattern Overview and classification
A: A summary of experience
B: Class Three
Create type
Structural type
Behavioral type
(3) Improved design patterns
A: Simple Factory mode
B: Factory Method mode
C: Singleton mode (Master)
A: A hungry man type
B: Lazy Type
(4) Runtime
A class that is applied by a singleton pattern provided by the JDK.
You can also invoke DOS commands.
Re-stepping Learning Java on the road _day24 (multi-threaded lock, thread Group, design mode)