Implement a segmented OutboundQueue 29/21829/9
authorRobert Varga <rovarga@cisco.com>
Tue, 2 Jun 2015 19:19:57 +0000 (21:19 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 9 Jun 2015 13:31:18 +0000 (15:31 +0200)
commitd7755318c0395f3f74ca580f4e2db963976776aa
tree746be41c3cddafe1e12040fcf75db7ead045aca4
parent754bef597c3b9de84e26bde968e7ab9a502344ff
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>
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]