Implement a segmented OutboundQueue 01/23401/1
authorRobert Varga <rovarga@cisco.com>
Tue, 2 Jun 2015 19:19:57 +0000 (21:19 +0200)
committerMichal Rehak <mirehak@cisco.com>
Fri, 26 Jun 2015 07:33:03 +0000 (09:33 +0200)
commitadf37207ab942a4742b66304a2ba61d14d71de2a
tree970ae5327296e170d4cff9c73c38aa0870aaa712
parent6edfff9e578c0bee8e83f657479ee8b45f154049
Implement a segmented OutboundQueue

Internal lifecycle of a queue segment is disconnected. With this
implementation users do not observe queue changes until channel
shutdown, when the reported queue changes to null.

The reason for that is that the segments are managed internally without
the need to synchronize with the Netty thread. That synchronization is
performed only when there are multiple segments -- which is typical for
crossing the request count barrier.

Outbound queue manager is taght to not schedule a flush task it the
current state of the channel indicates that scheduling is not needed,
such as when the channel is not writable.

Change-Id: I037e27c00524e2a6ec218e3e7c1a5d6188b25ae8
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit d7755318c0395f3f74ca580f4e2db963976776aa)
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImpl.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/OutboundQueueCache.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/OutboundQueueCacheSlice.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/OutboundQueueImpl.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/OutboundQueueManager.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedOutboundQueue.java [new file with mode: 0644]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedSegment.java [new file with mode: 0644]