书目详情:
Java 7 Concurrency CookbookTable of ContentsJava 7 Concurrency CookbookCreditsAbout the AuthorAbout the Reviewerswww.PacktPub.comSupport files, eBooks, discount offers and moreWhy Subscribe?Free Access for Packt account holdersInstant Updates on New Packt BooksPrefaceWhat this book coversWhat you need for this bookWho this book is forConventionsReader feedbackCustomer supportDownloading the example codeErrataPiracyQuestions1. Thread ManagementIntroductionCreating and running a threadGetting readyHow to do it...How it works...Theres more...See alsoGetting and setting thread informationGetting readyHow to do it...How it works...Theres more...See AlsoInterrupting a threadGetting readyHow to do it...How it works...Theres more...Controlling the interruption of a threadGetting readyHow to do it...How it works...Theres more...See alsoSleeping and resuming a threadGetting readyHow to do it...How it works...Theres more...Waiting for the finalization of a threadGetting readyHow to do it...How it works...Theres more...Creating and running a daemon threadGetting readyHow to do it...How it works...Theres more...Processing uncontrolled exceptions in a threadGetting readyHow to do it...How it works...Theres more...See alsoUsing local thread variablesGetting readyHow to do it...How it works...Theres more...Grouping threads into a groupGetting readyHow to do it...How it works...Theres more...Processing uncontrolled exceptions in a group of threadsGetting readyHow to do it...How it works...See alsoCreating threads through a factoryGetting readyHow to do it...How it works...See also2. Basic Thread SynchronizationIntroductionSynchronizing a methodGetting readyHow to do it...How it works...Theres more...Arranging independent attributes in synchronized classesGetting readyHow to do it...How it works...Theres more...See alsoUsing conditions in synchronized codeGetting readyHow to do it...How it works...Theres more...See alsoSynchronizing a block of code with a LockGetting Ready...How to do it...How it works...Theres more...More InfoSee alsoSynchronizing data access with read/write locksGetting Ready...How to do it...How it works...See alsoModifying Lock fairnessGetting Ready...How to do it...How it works...Theres more...See alsoUsing multiple conditions in a LockGetting Ready...How to do it...How it works...Theres more...See also3. Thread Synchronization UtilitiesIntroductionControlling concurrent access to a resourceGetting readyHow to do it...How it works...Theres more...Fairness in semaphoresSee alsoControlling concurrent access to multiple copies of a resourceGetting readyHow to do it...How it works...Theres more...See alsoWaiting for multiple concurrent eventsGetting readyHow to do it...How it works...Theres more...Synchronizing tasks in a common pointGetting readyHow to do it...How it works...Theres more...Resetting a CyclicBarrier objectBroken CyclicBarrier objectsSee alsoRunning concurrent phased tasksGetting readyHow to do it...How it works...Theres more...Registering participants in the PhaserForcing the termination of a PhaserSee alsoControlling phase change in concurrent phased tasksGetting readyHow to do it...How it works...See alsoChanging data between concurrent tasksGetting readyHow to do it...How it works...Theres more...4. Thread ExecutorsIntroductionCreating a thread executorGetting readyHow to do it...How it works...Theres more...See alsoCreating a fixed-size thread executorGetting readyHow to do it...How it works...Theres more...See alsoExecuting tasks in an executor that returns a resultGetting ready...How to do it...How it works...Theres more...See alsoRunning multiple tasks and processing the first resultGetting readyHow to do it...How it works...Theres more...See alsoRunning multiple tasks and processing all the resultsGetting readyHow to do it...How it works...Theres more...See alsoRunning a task in an executor after a delayGetting readyHow to do it...How it works...Theres more...See alsoRunning a task in an executor periodicallyGetting readyHow to do it...How it works...Theres more...See alsoCanceling a task in an executorGetting readyHow to do it...How it works...Theres more...See alsoControlling a task finishing in an executorGetting readyHow to do it...How it works...See alsoSeparating the launching of tasks and the processing of their results in an executorGetting readyHow to do it...How it works...Theres more...See alsoControlling rejected tasks of an executorGetting readyHow to do it...How it works...Theres more...See also5. Fork/Join FrameworkIntroductionCreating a Fork/Join poolGetting readyHow to do it...How it works...Theres more...See alsoJoining the results of the tasksHow to do it...How it works...Theres more...See alsoRunning tasks asynchronouslyHow to do it...How it works...Theres more...See alsoThrowing exceptions in the tasksGetting readyHow to do it...How it works...Theres more...See alsoCanceling a taskGetting ready...How to do it...How it works...See also6. Concurrent CollectionsIntroductionUsing non-blocking thread-safe listsGetting readyHow to do it...How it works...Theres more...Using blocking thread-safe listsGetting readyHow to do it...How it works...Theres more...See alsoUsing blocking thread-safe lists ordered by priorityGetting readyHow to do it...How it works...Theres more...See alsoUsing thread-safe lists with delayed elementsGetting readyHow to do it...How it works...Theres more...See alsoUsing thread-safe navigable mapsGetting readyHow to do it...How it works...Theres more...See alsoGenerating concurrent random numbersGetting readyHow to do it...How it works...Theres more...See alsoUsing atomic variablesGetting readyHow to do it...How it works...Theres more...See alsoUsing atomic arraysGetting readyHow to do it...How it works...Theres more...See also7. Customizing Concurrency ClassesIntroductionCustomizing the ThreadPoolExecutor classGetting readyHow to do it...How it works...See alsoImplementing a priority-based Executor classGetting readyHow to do it...How it works...Theres more...See alsoImplementing the ThreadFactory interface to generate custom threadsGetting readyHow to do it...How it works...Theres more...Using our ThreadFactory in an Executor objectGetting ready...How to do it...How it works...See alsoCustomizing tasks running in a scheduled thread poolGetting readyHow to do it...How it works...Theres more...See alsoImplementing the ThreadFactory interface to generate custom threads for the Fork/Join frameworkGetting readyHow to do it...How it works...Theres more...See alsoCustomizing tasks running in the Fork/Join frameworkHow to do it...How it works...See alsoImplementing a custom Lock classGetting readyHow to do it...How it works...Theres more...See alsoImplementing a transfer Queue based on prioritiesGetting readyHow to do it...How it works...See alsoImplementing your own atomic objectGetting readyHow to do it...How it works...See also8. Testing Concurrent ApplicationsIntroductionMonitoring a Lock interfaceGetting readyHow to do it...How it works...Theres more...See alsoMonitoring a Phaser classGetting readyHow to do it...How it works...See alsoMonitoring an Executor frameworkGetting readyHow to do it...How it works...See alsoMonitoring a Fork/Join poolGetting readyHow to do it...How it works...See alsoWriting effective log messagesGetting readyHow to do it...How it works...Theres more...See alsoAnalyzing concurrent code with FindBugsGetting readyHow to do it...How it works...Theres more...See alsoConfiguring Eclipse for debugging concurrency codeGetting readyHow to do it...How it works...Configuring NetBeans for debugging concurrency codeGetting readyHow to do it...How it works...Theres more...See alsoTesting concurrency code with MultithreadedTCGetting readyHow to do it...How it works...Theres more...See alsoIndex
评论:

