concept minimum in category java

appears as: minimum, minimum
The Java Module System

This is an excerpt from Manning's book The Java Module System.

  • If you’re not yet on Java 8, make that update first. If a preliminary analysis shows that some of your dependencies cause problems on Java 9+, update them next. This ensures that you take one step at a time, thus keeping complexity to a minimum.
  • A big feature set of OSGi revolves around dynamic behavior, where its roots as an Internet of Things service gateway clearly show and where the implementation via class loaders enables powerful capabilities. OSGi allows bundles to appear, disappear, and even be updated at run time, exposing an API that lets dependencies react accordingly. This is great for applications running across multiple devices but can also come in handy for single-server systems that want to reduce downtime to a minimum.

    Java 8 in Action: Lambdas, streams, and functional-style programming

    This is an excerpt from Manning's book Java 8 in Action: Lambdas, streams, and functional-style programming.

    To calculate the minimum, you need to pass Integer.min to the reduce operation instead of Integer.max:

    Listing 11.12. A custom Executor fitting our best-price-finder application
    private final Executor executor = Executors.newFixedThreadPool(Math.min(shops.size(), 100), #1 new ThreadFactory() { public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setDaemon(true); #2 return t; } }); #1: Create a thread pool with a number of threads equal to the minimum between 100 and the number of shops. #2: Use daemon threads—they don’t prevent the termination of the program.