Raja has Published 760 Articles

What is Unified JVM Logging in Java 9?

raja

raja

Updated on 12-Mar-2020 13:02:43

418 Views

Java 9 can provide a common logging system for JVM components with a detailed level. By using a new command-line option: -Xlog for all logging settings and unified JVM logging gives us an easy-to-configure tool to do a root cause analysis (RCA) of complex system-level JVM components.The command line -Xlog can be used for ... Read More

What is Common Locale Data Repository (CLDR) in Java 9?

raja

raja

Updated on 12-Mar-2020 10:15:10

413 Views

Internationalization enhancements for Java 9 include enabling of CLDR Locale Data by Default.There are four distinct sources for locale data identified by using the below keywords:CLDR: The locale data provided by a Unicode Common Locale Data Repository (CLDR) project.HOST: The current user’s customization of an underlying operating system’s settings. Depending on the ... Read More

What is New Versioning Scheme in Java 9?

raja

raja

Updated on 12-Mar-2020 08:15:26

510 Views

Since Java 9, versioning can be consistent with semantic versioning. The version number can be a non-empty sequence of strings separated by dots. It contains three major parts: major version number, minor version number, and security. The new versioning scheme has documented in Runtime. Version class and version information can be accessed ... Read More

How to implement an ArrayList using JShell in Java 9?

raja

raja

Updated on 11-Mar-2020 13:52:23

283 Views

JShell is an interactive Java Shell tool that enables us to execute java code from the shell and instantly displays the output. JShell is the REPL(Read Evaluate Print Loop) tool that runs from the command-line. We can start a JShell by simply typing "jshell" in the command prompt, and to exit the ... Read More

What is Platform Logging API in Java 9?

raja

raja

Updated on 11-Mar-2020 12:28:37

215 Views

In Java 9, Platform Logging API can be used to log messages with a service interface for consumers of those messages. An implementation of LoggerFinder has been loaded with the help of java.util.ServiceLoader API by using System ClassLoader. Based on this implementation, an application can plug in its own external logging backend without configuring java.util.logging.We can ... Read More

How to filter stack frames using StackWalker API in Java 9?

raja

raja

Updated on 11-Mar-2020 10:11:48

240 Views

StackWalker API provides a stream of information in stack traces during the execution of a program. This API requires a virtual machine to capture a snapshot of the entire stack and returns an array of elements for filtering purposes. We need to skip, drop, and limit the stack frames by using ... Read More

How to print different stack frames using StackWalker API in Java?

raja

raja

Updated on 11-Mar-2020 07:26:27

186 Views

Java 9 defines a StackWalker API that provides laziness and frame filtering. An object of StackWalker allows us to traverse and access stacks and contains one useful method: walk(). This method opens a StackFrame stream for the current thread, then applies the function with that StackFrame stream. We need to get StackWalker object, then use StackWalker.getInstance() method.In the ... Read More

When to use the delayedExecutor() method of CompletableFuture in Java 9?

raja

raja

Updated on 09-Mar-2020 10:59:05

2K+ Views

The delayedExecutor() method has been added to the CompletableFuture class in Java 9. CompletableFuture defines two overloaded methods of delayedExecutor(): first method returns an Executor object from the default Executor object that CompletableFuture object uses to execute the task after the delay and new Executor object can do task execution ... Read More

How can we implement the SubmissionPublisher class in Java 9?

raja

raja

Updated on 09-Mar-2020 09:45:11

586 Views

Since Java 9, we can create Reactive Streams by introducing four core interfaces: Publisher, Subscriber, Subscription, Processor, and one concrete class: SubmissionPublisher that implements the Publisher interface. Each interface plays a different role, corresponding to the principles of Reactive Streams. We can use the submit() method of SubmissionPublisher class to publish the provided item ... Read More

What are the core interfaces of Reactive Streams in Java 9?

raja

raja

Updated on 09-Mar-2020 06:36:32

501 Views

Java 9 has introduced Reactive Streams under java.util.concurrent.Flow package that supports an interoperable publish-subscribe framework. It processes an asynchronous stream of data across the asynchronous boundary (passing elements into another thread or thread-pool), and the receiving side is not forced to buffer arbitrary amounts of data, then buffer overflow can't occur.Flow ... Read More

Advertisements