BUG-5573: Altering the HandshakePool to have a LinkedBlockingQueue instead of an 84/38284/4
authorShuva Kar <shuva.jyoti.kar@ericsson.com>
Mon, 2 May 2016 15:11:40 +0000 (20:41 +0530)
committerShuva Jyoti Kar <shuva.jyoti.kar@ericsson.com>
Mon, 16 May 2016 10:44:49 +0000 (10:44 +0000)
commitaea1fb2d4eea3f5635d99b72471d5097112b07d6
tree8ee46223b9d93bc288dcc3c2b89198a775e94919
parent634507bd2edc21d6fe8266d80ba05e6a3887f7ce
BUG-5573: Altering the HandshakePool to have a LinkedBlockingQueue instead of an
ArrayBlockingQueue with size 20. The main difference between
ArrayBlockingQueue and LinkedBlockingQueue is clear from constructor one
has underlying data structure Array and other linkedList.

ArrayBlockingQueue uses single-lock double condition algorithm and
LinkedBlockingQueue is variant of the "two lock queue" algorithm and it
has 2 locks 2 conditions ( takeLock , putLock)

In scenarios that involve adding and removing elemenst LinkedBlockingQueue
performs better than ArrayBlockingQueue.

Change-Id: I08f077552599d663857db2ca6d33a86e3b5eb01e
Signed-off-by: Shuva Kar <shuva.jyoti.kar@ericsson.com>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/ConnectionManagerImpl.java