com.ibm.net.rdma.jverbs.verbs
Class MemoryRegion
- java.lang.Object
-
- com.ibm.net.rdma.jverbs.verbs.MemoryRegion
-
public class MemoryRegion extends java.lang.ObjectRepresents a memory region that is registered with the RDMA device. Memory registration must be done to pin memory with the RDMA device, which is necessary for any data operations. Memory registration is done through ProtectionDomain.registerMemory(). De-registering must be done when the memory buffer is no longer needed, by using ProtectionDomain.deregisterMemory(). Referred from RDMA programming manual by mellanox.
-
-
Field Summary
Fields Modifier and Type Field and Description static intIBV_ACCESS_LOCAL_WRITEEnable local write access constantstatic intIBV_ACCESS_MW_BINDEnable memory window binding constantstatic intIBV_ACCESS_REMOTE_ATOMICEnable remote atomic operation access constantstatic intIBV_ACCESS_REMOTE_READEnable remote read access constantstatic intIBV_ACCESS_REMOTE_WRITEEnable remote write access constant
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetAccess()Get the access used to create the memory region.longgetAddress()Gets the address of the memory associated with this MR.VerbsContextgetContext()The RDMA device context this MR is registered with.intgetHandle()A unique handle for this MR.intgetLength()Gets the length of the memory associated with this MR.intgetLocalKey()Gets the local key of the memory associated with this MR.intgetRemoteKey()Gets the remote key of the memory associated with this MR.java.lang.StringtoString()
-
-
-
Field Detail
-
IBV_ACCESS_LOCAL_WRITE
public static final int IBV_ACCESS_LOCAL_WRITE
Enable local write access constant- See Also:
- Constant Field Values
-
IBV_ACCESS_MW_BIND
public static final int IBV_ACCESS_MW_BIND
Enable memory window binding constant- See Also:
- Constant Field Values
-
IBV_ACCESS_REMOTE_ATOMIC
public static final int IBV_ACCESS_REMOTE_ATOMIC
Enable remote atomic operation access constant- See Also:
- Constant Field Values
-
IBV_ACCESS_REMOTE_READ
public static final int IBV_ACCESS_REMOTE_READ
Enable remote read access constant- See Also:
- Constant Field Values
-
IBV_ACCESS_REMOTE_WRITE
public static final int IBV_ACCESS_REMOTE_WRITE
Enable remote write access constant- See Also:
- Constant Field Values
-
-
Method Detail
-
getAccess
public int getAccess()
Get the access used to create the memory region.
-
getAddress
public long getAddress()
Gets the address of the memory associated with this MR.- Returns:
- the address of the memory registered.
-
getContext
public VerbsContext getContext()
The RDMA device context this MR is registered with.- Returns:
- the context
-
getHandle
public int getHandle()
A unique handle for this MR.- Returns:
- the handle
-
getLength
public int getLength()
Gets the length of the memory associated with this MR.- Returns:
- the length
-
getLocalKey
public int getLocalKey()
Gets the local key of the memory associated with this MR. Local keys can be passed around to enable accessing this memory from remote nodes.- Returns:
- the local key.
-
getRemoteKey
public int getRemoteKey()
Gets the remote key of the memory associated with this MR.- Returns:
- the remote key.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-