Loading...
Searching...
No Matches
ucxx::EndpointBuilder Class Referencefinal

Builder class for constructing std::shared_ptr<ucxx::Endpoint> objects. More...

#include <endpoint_builder.h>

Public Member Functions

 EndpointBuilder (std::shared_ptr< Worker > worker, std::string ipAddress, uint16_t port)
 Constructor for EndpointBuilder from hostname and port.
 EndpointBuilder (std::shared_ptr< Listener > listener, ucp_conn_request_h connRequest)
 Constructor for EndpointBuilder from a connection request.
 EndpointBuilder (std::shared_ptr< Worker > worker, std::shared_ptr< Address > address)
 Constructor for EndpointBuilder from a worker address.
 ~EndpointBuilder ()
 EndpointBuilder destructor.
 EndpointBuilder (const EndpointBuilder &other)
 Copy constructor (deep-copies internal state).
EndpointBuilder & operator= (const EndpointBuilder &other)
 Copy assignment operator (deep-copies internal state).
 EndpointBuilder (EndpointBuilder &&) noexcept
 Move constructor.
EndpointBuilder & operator= (EndpointBuilder &&) noexcept
 Move assignment operator.
 operator std::shared_ptr< Endpoint > ()
 Implicit conversion operator to shared_ptr<Endpoint>.
EndpointBuilder & endpointErrorHandling (bool enable=true)
 Configure endpoint error handling.
std::shared_ptr< Endpoint > build ()
 Build and return the Endpoint.

Detailed Description

Builder class for constructing std::shared_ptr<ucxx::Endpoint> objects.

This class implements the builder pattern for std::shared_ptr<ucxx::Endpoint>. Construction happens when build() is called or when the builder is implicitly converted to std::shared_ptr<Endpoint>.

Constructor & Destructor Documentation

◆ EndpointBuilder() [1/3]

ucxx::EndpointBuilder::EndpointBuilder ( std::shared_ptr< Worker > worker,
std::string ipAddress,
uint16_t port )

Constructor for EndpointBuilder from hostname and port.

Parameters
[in]workerparent worker from which to create the endpoint.
[in]ipAddresshostname or IP address the listener is bound to.
[in]portport the listener is bound to.

◆ EndpointBuilder() [2/3]

ucxx::EndpointBuilder::EndpointBuilder ( std::shared_ptr< Listener > listener,
ucp_conn_request_h connRequest )

Constructor for EndpointBuilder from a connection request.

Parameters
[in]listenerlistener from which to create the endpoint.
[in]connRequestconnection request delivered by a listener callback.

◆ EndpointBuilder() [3/3]

ucxx::EndpointBuilder::EndpointBuilder ( std::shared_ptr< Worker > worker,
std::shared_ptr< Address > address )

Constructor for EndpointBuilder from a worker address.

Parameters
[in]workerparent worker from which to create the endpoint.
[in]addressaddress of the remote UCX worker.

Member Function Documentation

◆ build()

std::shared_ptr< Endpoint > ucxx::EndpointBuilder::build ( )
nodiscard

Build and return the Endpoint.

Each call to build() creates a new Endpoint instance with the current parameters.

Returns
The constructed shared_ptr<ucxx::Endpoint> object.

◆ endpointErrorHandling()

EndpointBuilder & ucxx::EndpointBuilder::endpointErrorHandling ( bool enable = true)

Configure endpoint error handling.

Parameters
[in]enablewhether endpoint error handling is enabled (default: true).
Returns
Reference to this builder for method chaining.

◆ operator std::shared_ptr< Endpoint >()

ucxx::EndpointBuilder::operator std::shared_ptr< Endpoint > ( )

Implicit conversion operator to shared_ptr<Endpoint>.

Returns
The constructed shared_ptr<ucxx::Endpoint> object.

The documentation for this class was generated from the following file: