Mastering Concurrency Programming with Java 8 by Javier Fernandez Gonzalez

Mastering Concurrency Programming with Java 8 by Javier Fernandez Gonzalez

Author:Javier Fernandez Gonzalez [Gonzalez, Javier Fernandez]
Language: eng
Format: epub, azw3, mobi, pdf
Publisher: Packt Publishing
Published: 2016-02-28T23:00:00+00:00


The concurrent version

To implement the concurrent version of the algorithm, we have used the Fork/Join framework. We have implemented two different tasks based on the RecursiveAction class. As we mentioned earlier, the RecursiveAction task is used when you want to use the Fork/Join framework with tasks that do not return a result. We have implemented the assignment and the update phases as tasks to be executed in a Fork/Join framework.

To implement the concurrent version of the k-means algorithm, we are going to modify some of the common classes to use concurrent data structures. Then, we are going to implement the two tasks, and finally, we are going to implement the ConcurrentKMeans that implements the concurrent version of the algorithm and the ConcurrentMain class to test it.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.