-
Java Concurrency Tutorial – Locking: Explicit locks
Concurrency, Java ·In many cases, using implicit locking is enough. Other times, we will need more complex functionalities. In such cases, java.util.concurrent.locks package provides us with lock objects. When it comes to memory synchronization, the internal mechanism of these locks is the same as with implicit locks. The difference is that explicit locks offer additional features.
The main advantages or improvements over...
-
Exposing HTTP Restful API with Inbound Adapters. Part 2 (Java DSL)
Integration, Spring ·In the previous part of this tutorial, we implemented an application exposing a Restful API using XML configuration. This part will re-implement this application using Spring Integration Java DSL.
The application is implemented with Java 8, but when Java 8 specific code is used (for example, when using lambdas), I will also show you how to do it...
-
Exposing HTTP Restful API with Inbound Adapters. Part 1 (XML)
Integration, Spring ·The purpose of this post is to implement an HTTP Restful API using Spring Integration HTTP inbound adapters. This tutorial is divided into two parts:
- XML configuration example (this same post).
- Java DSL example. This will be explained in the next part of this tutorial, showing how to configure the application using Spring...
-
Java Concurrency Tutorial – Locking: Intrinsic locks
Concurrency, Java ·In previous posts we reviewed some of the main risks of sharing data between different threads (like atomicity and visibility). Additionally, we learnt how to design classes in order to be shared safely (thread safe designs). In many situations though, we will need to share mutable data, where some threads will...
-
Java Concurrency Tutorial
Concurrency, Java ·This Java concurrency tutorial consists of several posts that explain the main concepts of concurrency in Java. It starts with the basics with posts about the main concerns or risks of using non synchronised programs.
This tutorial consists on two main areas:
- Basic concepts about how concurrency works
- This section explains different synchronisation mechanisms
Therefore, each section concept...