concurrent
-
JavaFX
The JavaFX Concurrent Framework
This is an article about the JavaFX Concurrent Framework API. Java 5 added a comprehensive concurrency framework to the Java…
Read More » -
ReentrantLock
Java ReentrantReadWriteLock Example
This is an example of how to make use of the ReentrantReadWriteLock class of Java. It is an implementation of…
Read More » -
AtomicReference
Java AtomicMarkableReference Example
In this example we shall make use of AtomicMarkableReference class of Java. It is another class under the java.util.concurrent.atomic package,…
Read More » -
AtomicInteger
Java AtomicInteger Example
This is an example of how to use the AtomicInteger class of Java. The java.util.concurrent.atomic package provides very useful classes…
Read More » -
concurrent
CountDownLatch example of a more general wait/notify mechanism
In this example we shall show you how to create a CountDownLatch of a more general wait/notify mechanism. We have…
Read More » -
concurrent
Synchronous Queue example to execute commands
private BlockingQueue workQueue = new LinkedBlockingQueue(); private Map commandQueueMap = new ConcurrentHashMap(); public SynchronousQueue addCommand(Command command) { SynchronousQueue queue =…
Read More » -
concurrent
Blocking Queue example of limited connection pool
private BlockingQueue<Connection> pool = new ArrayBlockingQueue<Connection>(10); private AtomicInteger connCount = new AtomicInteger(); public Connection getConnection() { Connection conn = pool.poll(5,…
Read More » -
concurrent
Blocking Queue example to execute commands
import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; private BlockingQueue<Command> workQueue = new LinkedBlockingQueue<Command>(); public void addCommand(Command command) { workQueue.offer(command); } public Object call()…
Read More » -
concurrent
Reentrant Lock example of a task runner
With this example we are going to demonstrate how to implement a ReentrantLock of a task runner. The ReentrantLock is…
Read More » -
concurrent
Reentrant ReadWriteLock example of value calculator
This is an example of how to use a ReentrantReadWriteLock of a value calculator. We have implemented a method that…
Read More »
- 1
- 2