Featured Post

BlockingQueue

Java BlockingQueue interface is part of java collections framework and it’s primarily used for implementing producer consumer problem. We don’t need to worry about waiting for the space to be available for producer or object to be available for consumer in BlockingQueue because it’s handled by implementation classes of BlockingQueue.
Java provides several BlockingQueue implementations such as ArrayBlockingQueueLinkedBlockingQueuePriorityBlockingQueueSynchronousQueue etc.
While implementing producer consumer problem in BlockingQueue, we will use ArrayBlockingQueue implementation. Following are some important methods you should know.



Comments

Popular posts from this blog

[Inside AdSense] Understanding your eCPM (effective cost per thousand impress...