public class OutboundQueueProviderImpl extends Object implements OutboundQueueProvider
| Constructor and Description |
|---|
OutboundQueueProviderImpl(short ofVersion) |
| 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> isComplete)
Commit the specified offset using a message.
|
BarrierInput |
createBarrierRequest(Long xid)
Create a new
barrier message. |
void |
onConnectionQueueChanged(OutboundQueue queue)
Invoked whenever the underlying queue is refreshed.
|
Long |
reserveEntry()
Reserve an entry in the outbound queue.
|
@Nonnull public BarrierInput createBarrierRequest(@Nonnull Long xid)
OutboundQueueHandlerbarrier message. This callback is invoked
when the queue is being flushed to the switch. The barrier ensures that any
outstanding requests are detected as either completed or failed.createBarrierRequest in interface OutboundQueueHandlerxid - XID for the barrier messagepublic void onConnectionQueueChanged(OutboundQueue queue)
OutboundQueueHandleronConnectionQueueChanged in interface OutboundQueueHandlerqueue - New queue instance, null indicates a shutdown, e.g. the queue
is no longer available.public Long reserveEntry()
OutboundQueuereserveEntry in interface OutboundQueuepublic void commitEntry(Long xid, OfHeader message, com.google.common.util.concurrent.FutureCallback<OfHeader> callback)
OutboundQueueFutureCallback.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 OutboundQueuexid - 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.public void commitEntry(Long xid, OfHeader message, com.google.common.util.concurrent.FutureCallback<OfHeader> callback, Function<OfHeader,Boolean> isComplete)
OutboundQueueFutureCallback.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 OutboundQueuexid - 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.isComplete - Function to determine if OfHeader is processing is completeCopyright © 2019 OpenDaylight. All rights reserved.