com.ibm.net.rdma.jverbs.verbs

Class ProtectionDomain

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


  • public class ProtectionDomain
    extends java.lang.Object

    A protection domain (PD) helps to group the objects that can work together. For example, if several objects are created using PD1, and other objects are created using PD2, working with objects from both groups at the same time results in IOException.

    PDs limit which memory regions can be accessed by which queue pairs (QP), providing a degree of protection from unauthorized access. The user must create at least one PD to use verbs APIs.
    • Method Detail

      • deregisterMemoryRegion

        public DeregisterMemoryRegionMethod deregisterMemoryRegion(MemoryRegion mr)
                                                            throws java.lang.IllegalArgumentException,
                                                                   java.io.IOException
        Deregister memory.
        Returns:
        DeregisterMemoryRegionMethod, a stateful verb method (SVM) ready to execute the memory de-registration.
        Throws:
        java.io.IOException - If an I/O error occurs
        java.lang.IllegalArgumentException - If the value of any of the parameter is invalid
      • getContext

        public VerbsContext getContext()
        The RDMA device context this protection domain is attached to.
        Returns:
        the context
      • getHandle

        public int getHandle()
        A unique handle identifying this protection domain.
        Returns:
        the handle
      • registerMemoryRegion

        public RegisterMemoryRegionMethod registerMemoryRegion(java.nio.ByteBuffer buffer,
                                                               int access)
                                                        throws java.lang.IllegalArgumentException,
                                                               java.io.IOException
        Registers the memory of a ByteBuffer with the RDMA device.
        Parameters:
        buffer - the actual memory to be registered.
        access - the access rights.
        Returns:
        RegisterMemoryRegionMethod, a stateful verb method (SVM) ready to execute the memory registration.
        Throws:
        java.io.IOException - If an I/O error occurs
        java.lang.IllegalArgumentException - If the value of any of the parameter is invalid