Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Distributed Computing in Java 9

You're reading from   Distributed Computing in Java 9 Leverage the latest features of Java 9 for distributed computing

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781787126992
Length 304 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Customer Feedback
1. Quick Start to Distributed Computing FREE CHAPTER 2. Communication between Distributed Applications 3. RMI, CORBA, and JavaSpaces 4. Enterprise Messaging 5. HPC Cluster Computing 6. Distributed Databases 7. Cloud and Distributed Computing 8. Big Data Analytics 9. Testing, Debugging, and Troubleshooting 10. Security

Java 9 updates for processing an API


Java 9 provides a refined Process API to control and manage the process with better performance in your operating system.

Process control could be made easier by accessing the process ID (PID), username, and resource utilization with the processing path information from the operating system. The multithreaded approach from previous versions is refined to easily deal with process trees and destruct or manage processes that have multiple subprocesses.

The following is an example of retrieving the PID of the current process with this API:

private static int getOwnProcessID(){
  return ProcessHandle.current().getPid();
}

The following is a code snippet for getting a list of all the processes running on the operating system:

private static void listProcesses(){
  ProcessHandle.allProcesses().forEach((h) -> printHandle(h));
}     

private static void printHandle(ProcessHandle procHandle) {
  // get info from handle
  ProcessHandle.Info procInfo = procHandle...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime
Visually different images