imsavva.com

Folder icon

Tags / concurrency

1Z0-808
2018
ATG
Apache Fop
Bash
CNC
Elasticsearch
GWT
Groovy
JPA
Java
JavaScript
Jenkins
Jetty
Kibana
Linux
Malta
MySQL
OCA
PDF
Sed
Ubuntu
Windows services
collections
concurrency
dates
dig deeper
essay
exceptions
food
games
interview questions
logging
movies
patterns
photos
shopping
task
technical
thoughts
trash
trip
windows

Using one DateFormat instance per thread with ThreadLocal

Here is a quick tip how to use DateFormat inside a ThreadLocal field. Why do we need that? The reason is the DateFormat class is not thread-safe but creating its instances is an expensive operation. So, this is kind of a workaround that creates only one instance of DateFormat per thread.
Posted on
2017-07-12

UnhandledExceptionHandler in Java: how to catch uncaught exceptions

In this short tutorial, I'm going to describe how to handle uncaught exceptions in threads. This can be done by: Using threadInstance.setUncaughtExceptionHandler() ─ for a specific thread Overriding ThreadGroup's uncaughtException() method ─ for a thread group Using Thread.setDefaultUncaughtExceptionHandler() ─ for all…
Posted on
2017-07-05
Do I really need the footer?