com.ibm.net.rdma.jverbs.endpoints
Class RdmaEndpointGroup<C extends RdmaEndpoint>
- java.lang.Object
-
- com.ibm.net.rdma.jverbs.endpoints.RdmaEndpointGroup<C>
-
- Direct Known Subclasses:
- RdmaActiveEndpointGroup
public class RdmaEndpointGroup<C extends RdmaEndpoint> extends java.lang.ObjectThe default implementation of a RdmaEndpoint group. RdmaEndpointGroup manages endpoints and performs connection event processing for managed endpoints. It controls the association between queue pair, completion queue and endpoints. This default implementation assigns a new CompletionQueue to each endpoint, without any active CompletionQueue processing. Other extensions of the RdmaEndointGroup provide different associations.
-
-
Constructor Summary
Constructors Constructor and Description RdmaEndpointGroup(RdmaEndpointFactory<C> factory)Creates an instance of RdmaEndpointGroup for a custom RdmaEndpointFactory.RdmaEndpointGroup(RdmaEndpointFactory<C> factory, int timeout)Creates an instance of RdmaEndpointGroup for a custom RdmaEndpointFactory with timeout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close this endpoint group by closing all client and server endpoints.CcreateEndpoint()Creates a new endpoint.RdmaServerEndpoint<C>createServerEndpoint()Creates a new server endpoint.booleanisClosed()Checks whether EndpointGroup is closed.
-
-
-
Constructor Detail
-
RdmaEndpointGroup
public RdmaEndpointGroup(RdmaEndpointFactory<C> factory) throws java.io.IOException
Creates an instance of RdmaEndpointGroup for a custom RdmaEndpointFactory. Timeout for blocking event processing call getConnectionEvent() will be assumed 2 secs.- Throws:
java.io.IOException- If an I/O error occurs
-
RdmaEndpointGroup
public RdmaEndpointGroup(RdmaEndpointFactory<C> factory, int timeout) throws java.io.IOException
Creates an instance of RdmaEndpointGroup for a custom RdmaEndpointFactory with timeout. Timeout in milliseconds specifies time period the blocking event processing call getConnectionEvent() wait for event, timeout less than 2 secs will default to 2 secs.- Throws:
java.io.IOException- If an I/O error occurs
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionClose this endpoint group by closing all client and server endpoints. This closes the connection and free's all the resources, e.g., queue pair.- Throws:
java.io.IOException- If an I/O error occurs
-
createEndpoint
public C createEndpoint() throws java.io.IOException
Creates a new endpoint.- Returns:
- the newly created endpoint.
- Throws:
java.io.IOException- If an I/O error occurs
-
createServerEndpoint
public RdmaServerEndpoint<C> createServerEndpoint() throws java.io.IOException
Creates a new server endpoint.- Returns:
- the newly created endpoint.
- Throws:
java.io.IOException- If an I/O error occurs
-
isClosed
public boolean isClosed()
Checks whether EndpointGroup is closed.- Returns:
- true, if closed.
-
-