"Java Concurrency Programming"

Source: Internet
Author: User
Tags closure time limit volatile

List of accolades for this book preface to the 1th Chapter Introduction to 1.1 Concurrent History 1.2 threading Benefits 1.2.1 The power of multi-processor 1.2.2 Modeling Simplicity 1.2.3 Simplified handling of asynchronous Events 1.2.4 Responsive user Interface 1.3 lines  Risk 1.3.1 Security Issues 1.3.2 Active issues 1.3.3 performance issues 1.4 threads everywhere first part of the Basics 2nd thread Security 2.1 What is thread security 2.2 atomicity 2.2.1 Race Condition 2.2.2 Example: Race condition in deferred initialization 2.2.3 compound Operation 2.3 Lock mechanism 2.3.1 built-in lock 2.3.2 re-entry 2.4 use lock to protect state 2.5 activity and performance 3rd the sharing of the object 3.    1 Visibility 3.1.1 Failure Data 3.1.2 Non-atomic 64-bit operation 3.1.3 locking with visibility 3.1.4 volatile variable 3.2 released with Escape 3.3 thread closed 3.3.1 Ad-hoc thread closed 3.3.2 Stack closed 3.3.3 Threadlocal Class 
3.4 invariance 3.4.1 Final domain 3.4.2 Example: using volatile types to publish an immutable object 3.5 security release 3.5.1 Incorrect publication: The correct object is broken 3.5.2 immutable objects and initialization security 3.5.3 secure Common patterns of cloth 3.5.4 fact immutable objects 3.5.5 mutable objects 3.5.6 securely share objectsChapter 4th The combination of objects4.1 Designing Thread-Safe Classes 4.1.1 Collecting synchronization requirements 4.1.2 Dependency status 4.1.3 ownership of the state 4.2 instance enclosing 4.2.1 Java Monitor mode 4.2.2 Example: vehicle tracking 4.3 thread safety delegate 4.3 .1 Example: a delegate-based vehicle tracker 4.3.2 Independent State variable 4.3.3 4.3.4 publish the underlying state variable when the delegate fails 4.3.5 example: Vehicle tracker with release status 4.4 Adding functionality to existing thread-safe classes 4.4.1 Client lock machine 4.4.2 Combination 4.5 Document the synchronization policy5th Chapter Basic Building Module5.1 Synchronizing container Classes 5.1.1 problems with the synchronization container class 5.1.2 iterators and Concurrent-modificationexception 5.1.3 hidden iterators 5.2 Concurrent Containers 5.2.1 Concurrenthashmap 5.2.2 Additional atomic map Operations 5.2.3 Copyonwritearraylist 5.3 blocking queue and producer-Consumer mode 5.3.1 Example: Desktop Search 5.3.2 serial thread closed 5.3.3 double-ended queue and work-over-fetch 5.4 Blocking method and interrupt method 5.5 Synchronization Tool class 5.5.1 latching 5.5.2 Futuretask 5.5.3 semaphore 5.5.4 Fence 5.6 Build efficient and scalable results cacheThe second part of structured concurrent applications   Chapter 6th Task Execution6.1 Perform tasks in thread 6.1.1 perform tasks serially 6.1.2 explicitly create threads for tasks 6.1.3 6.2 Executor Framework 6.2.1 Example: Executor-based Web server 6.2.2 execution with unlimited thread creation   Policy 6.2.3 thread pool 6.2.4 Executor life cycle 6.2.5 delay task and Cycle task 6.3 find out the available parallelism 6.3.1 example: Serial page renderer 6.3.2 task with results callable and future 6.3.3 Example: Using the future to implement page renderer 6.3.4 limitations in heterogeneous task parallelism 6.3.5 completionservice:executor and Blockingqueue 6.3.6 example: using completions Ervice Implementing a page renderer 6.3.7 setting a time limit for a task 6.3.8 example: travel booking Portal7th Chapter cancellation and Closure7.1 Task Cancellation 7.1.1 interrupt 7.1.2 Interrupt Policy 7.1.3 Response Interrupt 7.1.4 Example: Timed run 7.1.5 through the future to achieve cancellation 7.1.6 Handling non-disruptive blocking 7.1.7 using newtaskfor To encapsulate non-standard cancellation 7.2 stop thread-based service 7.2.1 Example: Log service 7.2.2 close Executorservice 7.2.3 "poison pill" Object 7.2.4 Example: only once service 7.2.5 Shutdownnow Limitation 7.3 Handling of abnormal thread termination 7.4 JVM shutdown 7.4.1 Close Hook 7.4.2 daemon thread 7.4.3 TerminatorChapter 8th use of thread pool8.1 Implicit coupling between task and execution Strategy 8.1.1 Thread starvation deadlock 8.1.2 run longer task 8.2 Set the size of the thread pool 8.3 configuration threadpoolexecutor 8.3.1 thread creation and destruction 8.3.2 Management queue Task 8.3.3 saturation policy 8.3.4 thread factory 8.3.5 customizing threadpoolexecutor 8.4 extension threadpoolexecutor 8.5 recursive algorithm parallelization after calling the constructor9th Chapter Graphical user interface Applications9.1 Why GUI is single threaded 9.1.1 serial event processing 9.1.2 Swing thread closure mechanism 9.2 short time GUI task 9.3 Long GUI task 9.3.1 cancel 9.3.2 Progress identity and complete identity 9.3.3 Sw Ingworker 9.4 Shared data Model 9.4.1 Thread-safe data Model 9.4.2 decomposition Data Model 9.5 Other forms of single-threaded subsystemsthe third part of the activity, performance and testing   10th chapter to avoid the danger of being active10.1 Deadlock 10.1.1 Lock sequence deadlock 10.1.2 Dynamic lock order deadlock 10.1.3 deadlock occurring between collaboration objects 10.1.4 Open call 10.1.5 resource Deadlock 10.2 deadlock avoidance with diagnostic 10.2.1 support timed lock 10.2.2 analysis of deadlocks by thread dump information 10.3 Other active danger 10.3.1 hunger 10.3.2 poor responsive 10.3.3 live lock11th Chapter Performance and scalability11.1 Thinking about performance 11.1.1 performance and Scalability 11.1.2 evaluate various performance tradeoffs 11.2 Amdahl Law 11.2.1 Example: The application of 11.2.2 Amdahl law hidden in the serial part of various frameworks 11.3 threading introduced Overhead 11.3.1 Context Switch 11.3.2 Memory Sync 11.3.3 blocking 11.4 Reduced lock contention 11.4.1 narrowing lock range ("Fast forward fast out") 11.4.2 reduce lock granularity 11.4.3 lock segment 11.4.4 Avoid heat Point Domain 11.4.5 Some alternative exclusive locks 11.4.6 Monitor CPU utilization 11.4.7 say "No" to the object Pool 11.5 Example: Compare map performance 11.6 Reduce the overhead of context switchingthe 12th chapter of concurrent program testing12.1 Correctness Test 12.1.1 basic unit Test 12.1.2 Test 12.1.3 Security test for blocking Operations 12.1.4 Resource Management test 12.1.5 use callback 12.1.6 to generate more alternating operations 12.2 performance tests 12.2.1 added chronograph function in Puttaketest 12.2. Comparison of more than 2 algorithms 12.2.3 responsiveness measures 12.3 avoidance of performance test traps 12.3.1 garbage collection 12.3.2 Dynamic compilation 12.3.3 Not true for code paths Real sampling 12.3.4 Unreal Competition degree 12.3.5 elimination of useless code 12.4 Other test methods 12.4.1 code review 12.4.2 static analysis tools 12.4.3 aspect-oriented testing techniques 12.4.4 analysis and monitoring toolsPart IV Advanced Topics   13th Chapter Explicit Lock13.1 Lock and Reentrantlock 13.1.1 Polling lock with timed lock 13.1.2 interruptible Lock acquisition Operation 13.1.3 Non-block structure lock 13.2 Performance Considerations 13.3 Fairness 13.4 in synchronized and R Choose between Eentrantlock 13.5 read-write lock14th. Building a custom Sync tool14.1 State-dependent Management 14.1.1 Example: passing a precondition failure to the caller 14.1.2 example: implementing simple blocking by polling with hibernation 14.1.3 condition queue 14.2 Using conditional queue 14.2.1 conditional predicate 14.2.2 premature call Wake 14.2.3 lost signal 14.2.4 notification 14.2.5 Example: Valve Class 14.2.6 subclass of security issues 14.2.7 package conditions Queue 14.2.8 Ingress protocol and egress Protocol 14.3 Explicit Condition object 14. 4 Synchronizer Anatomy 14.5 Abstractqueuedsynchronizer 14.6 java.util.concurrent Synchronizer class AQS 14.6.1 reentrantlock 14.6.2 Sem Aphore and Countdownlatch 14.6.3 futuretask 14.6.4 reentrantreadwritelockthe 15th chapter atom variable and non-blocking synchronization mechanism15.1 Disadvantages of the lock 15.2 hardware support for concurrency 15.2.1 compare and exchange 15.2.2 non-blocking counters 15.2.3 JVM support for CAS 15.3 atomic variable class 15.3.1 atomic variable is a "better volatile" 1 5.3.2 Performance Comparison: Lock and Atom variable 15.4 non-blocking algorithm 15.4.1 non-blocking stack 15.4.2 non-blocking list 15.4.3 Atom Domain Updater 15.4.4 aba problem16th Chapter Java memory Model16.1 What is the memory model and why does it need it 16.1.1 platform memory model 16.1.2 reordering 16.1.3 Java memory model introduction 16.1.4 with synchronization 16.2 release 16.2.1 unsafe release 16.2.2 secure hair Fabric 16.2.3 Security Initialization mode 16.2.4 double check lock 16.3 Security in the process of initialization Appendix A concurrency tagging reference

book pdf download :Https://pan.baidu.com/s/1TZEqLTezFn-EIEeWYj9D5Q Password: AXDD

"Java Concurrency Programming"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.