JSCH / CATATAN</>↗JSch11 Mei 2025
Integrating JSch with a custom logging framework to facilitate SSH auditing involves capturing and routing pertinent log information about SSH connections, commands, and activities into your custom logging mechanism. Below are the steps and considerations to achieve this: 1. Set a Custom Logger for JSch JSch allows integration with custom loggers by implementing the com.jcraft.jsch.Logger […]
CONCURRENCY / CATATAN</>↗Concurrency11 Mei 2025
Optimizing task-splitting strategies in RecursiveTask (a subclass of the ForkJoin framework in Java) is crucial for improving performance and minimizing inefficiencies like excessive overhead or poor parallelism. Here are some strategies and tips to achieve efficient task splitting: 1. Choose an Optimal Threshold The optimal threshold (commonly called a “granularity threshold”) determines when you should […]
CONCURRENCY / CATATAN</>↗Concurrency11 Mei 2025
To implement a custom blocking queue in Java for special use cases, you can extend the AbstractQueue or directly implement the BlockingQueue<T> interface available in the java.util.concurrent package. A blocking queue is a data structure that supports thread-safe operations and blocks threads attempting to enqueue or dequeue elements when the queue is full or empty, […]
JSCH / CATATAN</>↗JSch10 Mei 2025
Creating a reusable SSH connection pool using JSch in a multithreaded application involves managing connections efficiently and ensuring thread safety. JSch (Java Secure Channel) does not natively provide a connection pooling feature, so you have to implement it manually using a pooling library or write your own pooling logic. Below is the step-by-step guide to […]
CONCURRENCY / CATATAN</>↗Concurrency10 Mei 2025
Building scalable parallel algorithms using ForkJoinTask in Java involves employing the Fork/Join framework, provided by the java.util.concurrent package. The Fork/Join framework is designed for recursive divide-and-conquer tasks that can be efficiently split into smaller subtasks that are processed in parallel. Here’s how you can approach building scalable parallel algorithms using ForkJoinTask: Steps to Build Scalable […]
SPRING CORE / CATATAN</>↗Spring Core10 Mei 2025
In Spring, component scanning is a feature that allows the framework to detect and register Beans (annotated with @Component, @Service, @Repository, @Controller, or any custom stereotype annotations) automatically during application startup. Here’s how you can enable and use this feature effectively: 1. Enable Component Scanning in a Java Configuration Class To enable automatic scanning, use […]