com.ibm.net.rdma.jverbs.verbs

Class CompletionQueue

  • java.lang.Object
    • com.ibm.net.rdma.jverbs.verbs.CompletionQueue


  • public class CompletionQueue
    extends java.lang.Object
    Represents a completion queue (CQ). CQs hold events that indicate the completion of data transfer operations. CQs are created by using ProtectionDomain and CompletionChannel. By default, CQs are associated with the Channel that created the queue. Several queue pairs (QPs) can share the same CQ.
    • Method Detail

      • getChannel

        public CompletionChannel getChannel()
        Gets the completion channel associated with this CQ.
        Returns:
        the completion channel.
      • getContext

        public VerbsContext getContext()
        The device context for this completion queue.
        Returns:
        the device context.
      • getHandle

        public int getHandle()
        A unique handle for this completion queue.
        Returns:
        a unique handle.
      • getMaxEventEntries

        public int getMaxEventEntries()
        Gets the number of event entries this CQ can possibly store.
        Returns:
        the maximum number of event entries.
      • pollCQ

        public PollCQMethod pollCQ(WorkCompletion[] workCompletionList,
                                   int maxCompletionEvents)
                            throws java.lang.IllegalArgumentException,
                                   java.io.IOException
        Poll to retrieve work completion information from the CQ. The actual number of work completion polled can be retrieved using PollCQMethod.getPolls().
        Parameters:
        workCompletionList - an array of completion events to be used by this method to return completion events.
        maxCompletionEvents - the maximum number of completion events to be polled.
        Returns:
        a stateful verb method (SVM) ready to execute a polling call.
        Throws:
        java.io.IOException - If an I/O error occurs
        java.lang.IllegalArgumentException - If the value of any of the parameter is invalid
      • requestNotifyCQ

        public RequestNotifyCQMethod requestNotifyCQ(boolean solicitedOnly)
                                              throws java.lang.IllegalArgumentException,
                                                     java.io.IOException
        Requests a completion notification on the completion queue (CQ). Needs to be executed to enable notification of WorkCompletion (before calling CompletionChannel.getCQEvent()).
        Parameters:
        solicitedOnly - if false, notification is enabled for all completion events. If true, notification is enabled only for solicited events.
        Returns:
        a Stateful verb method(SVM) ready to execute this call.
        Throws:
        java.io.IOException - If an I/O error occurs
        java.lang.IllegalArgumentException - If the value of any of the parameter is invalid