Java Synchronizers are concurrency utilities that provides thread synchronization without using wait() and notify() methods. The main purpose all the synchronizers is to protect the critical section against concurrent access by multiple thread.
There are five types of Synchronizers present in Java :
- This synchronizer restrict the number of threads that can access a resource, it means only n threads can access a certain resource at a given time.
- CountDown Latch is a synchronizer that allow one or more number of threads to wait until one or more number of threads completed some operation.
- This synchronizer allow a set of threads to all wait for each other to reach a common barrier point.