Speed up StackedOutboundQueue.reserve() 02/23402/1
authorRobert Varga <rovarga@cisco.com>
Sat, 6 Jun 2015 02:02:50 +0000 (04:02 +0200)
committerMichal Rehak <mirehak@cisco.com>
Fri, 26 Jun 2015 07:33:03 +0000 (09:33 +0200)
commit572484ff9330d12545769f9f14ec6083f94182e7
treeebfd55331c10081ef281690ca783c97067b4538f
parentadf37207ab942a4742b66304a2ba61d14d71de2a
Speed up StackedOutboundQueue.reserve()

In the case of multiple segments being present, we do not need to
completely synchronize if the corresponding segment has already been
allocated. Communicate this fact when allocating segments and check this
flag before embarking on the entire synchronized affair during
reserve().

Change-Id: I10a9ecb141f619b94a20d74152124134d36591b1
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 45547dc0381407ec537a924447ff9ce0d01890b2)
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedOutboundQueue.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedSegment.java