public class StackedOutboundQueueNoBarrier extends Object
Modifier and Type | Field and Description |
---|---|
protected org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment |
firstSegment |
protected int |
flushOffset |
protected static AtomicLongFieldUpdater<org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractStackedOutboundQueue> |
LAST_XID_OFFSET_UPDATER |
protected org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager<?,?> |
manager |
protected Integer |
shutdownOffset |
protected List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment> |
uncompletedSegments |
protected List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment> |
unflushedSegments |
Modifier and Type | Method and Description |
---|---|
void |
commitEntry(Long xid,
OfHeader message,
com.google.common.util.concurrent.FutureCallback<OfHeader> callback)
Commit the specified offset using a message.
|
void |
commitEntry(Long xid,
OfHeader message,
com.google.common.util.concurrent.FutureCallback<OfHeader> callback,
Function<OfHeader,Boolean> isCompletedFunction)
Commit the specified offset using a message.
|
protected void |
ensureSegment(org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment first,
int offset) |
protected org.opendaylight.openflowjava.protocol.impl.core.connection.OutboundQueueEntry |
getEntry(Long xid) |
Long |
reserveEntry()
Reserve an entry in the outbound queue.
|
protected static final AtomicLongFieldUpdater<org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractStackedOutboundQueue> LAST_XID_OFFSET_UPDATER
protected volatile org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment firstSegment
protected final List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment> unflushedSegments
protected final List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment> uncompletedSegments
protected Integer shutdownOffset
protected int flushOffset
protected final org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager<?,?> manager
public void commitEntry(Long xid, OfHeader message, com.google.common.util.concurrent.FutureCallback<OfHeader> callback, Function<OfHeader,Boolean> isCompletedFunction)
OutboundQueue
FutureCallback.onSuccess(Object)
will be invoked
multiple times as the corresponding responses arrive. If the request is completed
with a response, the object reported will be non-null. If the request's completion
is implied by a barrier, the object reported will be null.
If this request fails on the remote device, FutureCallback.onFailure(Throwable)
will be called with an instance of DeviceRequestFailedException
.
If the request fails due to local reasons, FutureCallback.onFailure(Throwable)
will be called with an instance of OutboundQueueException
. In particular, if
this request failed because the device disconnected, OutboundQueueException.DEVICE_DISCONNECTED
will be reported.
xid
- Previously-reserved XIDmessage
- Message which should be sent out, or null if the reservation
should be cancelled.callback
- Callback to be invoked, or null if no callback should be invoked.isCompletedFunction
- Function to determine if OfHeader is processing is completepublic void commitEntry(Long xid, OfHeader message, com.google.common.util.concurrent.FutureCallback<OfHeader> callback)
OutboundQueue
FutureCallback.onSuccess(Object)
will be invoked
multiple times as the corresponding responses arrive. If the request is completed
with a response, the object reported will be non-null. If the request's completion
is implied by a barrier, the object reported will be null.
If this request fails on the remote device, FutureCallback.onFailure(Throwable)
will be called with an instance of DeviceRequestFailedException
.
If the request fails due to local reasons, FutureCallback.onFailure(Throwable)
will be called with an instance of OutboundQueueException
. In particular, if
this request failed because the device disconnected, OutboundQueueException.DEVICE_DISCONNECTED
will be reported.
commitEntry
in interface OutboundQueue
xid
- Previously-reserved XIDmessage
- Message which should be sent out, or null if the reservation
should be cancelled.callback
- Callback to be invoked, or null if no callback should be invoked.protected void ensureSegment(org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment first, int offset)
public Long reserveEntry()
OutboundQueue
reserveEntry
in interface OutboundQueue
protected org.opendaylight.openflowjava.protocol.impl.core.connection.OutboundQueueEntry getEntry(Long xid)
Copyright © 2020 OpenDaylight. All rights reserved.