Class StackedOutboundQueueNoBarrier

java.lang.Object
org.opendaylight.openflowjava.protocol.impl.core.connection.StackedOutboundQueueNoBarrier
All Implemented Interfaces:
OutboundQueue

public class StackedOutboundQueueNoBarrier extends Object
Class is designed for stacking Statistics and propagate immediate response for all another requests.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected @GuardedBy("unflushedSegments") org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment
     
    protected int
     
    protected static final AtomicLongFieldUpdater<org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractStackedOutboundQueue>
     
    protected final org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager<?,?>
     
    protected @GuardedBy("unflushedSegments") Integer
     
    protected final @GuardedBy("unflushedSegments") List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment>
     
    protected final @GuardedBy("unflushedSegments") List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    commitEntry(org.opendaylight.yangtools.yang.common.Uint32 xid, OfHeader message, com.google.common.util.concurrent.FutureCallback<OfHeader> callback)
    Commit the specified offset using a message.
    void
    commitEntry(org.opendaylight.yangtools.yang.common.Uint32 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)
     
    org.opendaylight.yangtools.yang.common.Uint32
    Reserve an entry in the outbound queue.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LAST_XID_OFFSET_UPDATER

      protected static final AtomicLongFieldUpdater<org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractStackedOutboundQueue> LAST_XID_OFFSET_UPDATER
    • firstSegment

      protected volatile @GuardedBy("unflushedSegments") org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment firstSegment
    • unflushedSegments

      protected final @GuardedBy("unflushedSegments") List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment> unflushedSegments
    • uncompletedSegments

      protected final @GuardedBy("unflushedSegments") List<org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment> uncompletedSegments
    • shutdownOffset

      protected @GuardedBy("unflushedSegments") Integer shutdownOffset
    • flushOffset

      protected int flushOffset
    • manager

      protected final org.opendaylight.openflowjava.protocol.impl.core.connection.AbstractOutboundQueueManager<?,?> manager
  • Method Details

    • commitEntry

      public void commitEntry(org.opendaylight.yangtools.yang.common.Uint32 xid, OfHeader message, com.google.common.util.concurrent.FutureCallback<OfHeader> callback, Function<OfHeader,Boolean> isCompletedFunction)
      Description copied from interface: OutboundQueue
      Commit the specified offset using a message. Specified callback will be invoked once we know how it has resolved, either with a normal response, implied completion via a barrier, or failure (such as connection drop). For multipart responses, 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.

      Parameters:
      xid - Previously-reserved XID
      message - 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 complete
    • commitEntry

      public void commitEntry(org.opendaylight.yangtools.yang.common.Uint32 xid, OfHeader message, com.google.common.util.concurrent.FutureCallback<OfHeader> callback)
      Description copied from interface: OutboundQueue
      Commit the specified offset using a message. Specified callback will be invoked once we know how it has resolved, either with a normal response, implied completion via a barrier, or failure (such as connection drop). For multipart responses, 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.

      Specified by:
      commitEntry in interface OutboundQueue
      Parameters:
      xid - Previously-reserved XID
      message - 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.
    • ensureSegment

      @Holding("unflushedSegments") protected void ensureSegment(org.opendaylight.openflowjava.protocol.impl.core.connection.StackedSegment first, int offset)
    • reserveEntry

      public org.opendaylight.yangtools.yang.common.Uint32 reserveEntry()
      Description copied from interface: OutboundQueue
      Reserve an entry in the outbound queue.
      Specified by:
      reserveEntry in interface OutboundQueue
      Returns:
      XID for the new message, or null if the queue is full
    • getEntry

      protected org.opendaylight.openflowjava.protocol.impl.core.connection.OutboundQueueEntry getEntry(long xid)