Executors

Executors class provides factory and utility methods for creating Executor, ExecutorService and Callable classes. Mostly used methods are the ones that create ExecutorService instances. Executors have 2 defining properties: Task…

Continue Reading

Semaphore in Java

Semaphore guards a shared resource allowing only a defined number of threads to operate at a time. General behavior is as follows: Conceptually, a Semaphore maintains a set of permits.…

Continue Reading

ReadWriteLock in Java

ReadWriteLock provides similar functionality as ReentrantLock. You can create read lock and write lock  from ReadWriteLock. Read lock does not block other threads allowing read operations. Write lock blocks other…

Continue Reading

Lock/ReentrantLock in Java

Lock implementations guards a shared resource allowing a single thread to operate at a time. Lock implementations provide more extensive locking operations than can be obtained using synchronized methods and…

Continue Reading
Close Menu