|
You are here |
bruceeckel.com | ||
| | | | |
blog.scaledcode.com
|
|
| | | | | A dive into chapter 79 of Effective Java | |
| | | | |
www.craigpardey.com
|
|
| | | | | Spring 3.2 has some very nice features for scheduling tasks. The pure Java way of doing this looks something like private ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); class ScheduledTask implements Runnable { @Override public void run() { System.out.println("Running scheduled task"); } } // Schedule a task every 5 seconds executor.scheduleAtFixedRate(new ScheduledTask(), 1, 5, TimeUnit.SECONDS); // If you don't do this then the JVM won't exit cleanly executor.shutdown(); But now, with the snazzy new Spring scheduling annotations, it can be as simple as this | |
| | | | |
studiofreya.org
|
|
| | | | | [AI summary] This blog post provides five basic Java programming examples for beginners, covering Hello World, counting, adding numbers, printing patterns, and reversing strings. | |
| | | | |
www.morling.dev
|
|
| | | Recently I ran into a situation where it was necessary to capture the output of a Java process on the stdout stream, and at the same time a filtered subset of the output in a log file. The former, so that the output gets picked up by the Kubernetes logging infrastructure. The letter for further processing on our end: we were looking to detect when the JVM stops due to an OutOfMemoryError, passing on that information to some error classifier. | ||