Loading...
Searching...
No Matches
ucxx::RequestEndpointCloseBuilder Class Reference

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

#include <request_endpoint_close_builder.h>

Inheritance diagram for ucxx::RequestEndpointCloseBuilder:
ucxx::RequestCallbackBuilderBase< RequestEndpointCloseBuilder > ucxx::RequestBuilderBase< RequestEndpointCloseBuilder >

Public Member Functions

 RequestEndpointCloseBuilder (std::shared_ptr< Endpoint > endpoint, data::EndpointClose requestData)
 Constructor for RequestEndpointCloseBuilder with required parameters.
std::shared_ptr< RequestEndpointClose > build ()
 Build and return the RequestEndpointClose.
 operator std::shared_ptr< RequestEndpointClose > ()
 Implicit conversion operator to shared_ptr<RequestEndpointClose>.
 operator std::shared_ptr< Request > ()
 Implicit conversion operator to shared_ptr<Request>.
Public Member Functions inherited from ucxx::RequestCallbackBuilderBase< RequestEndpointCloseBuilder >
RequestEndpointCloseBuilder & callbackFunction (RequestCallbackUserFunction fn) &
 Set the user-defined callback function to call upon completion.
RequestEndpointCloseBuilder & callbackData (RequestCallbackUserData data) &
 Set the user-defined data to pass to the callback function.
Public Member Functions inherited from ucxx::RequestBuilderBase< RequestEndpointCloseBuilder >
 RequestBuilderBase ()=default
 Default constructor.
RequestBuilderBase & operator= (const RequestBuilderBase &)=delete
 Copy assignment disabled to prevent duplicate request submissions.
RequestEndpointCloseBuilder & pythonFuture (bool enable=true) &
 Configure Python future support.

Additional Inherited Members

Protected Member Functions inherited from ucxx::RequestBuilderBase< RequestEndpointCloseBuilder >
void markBuilt ()
 Assert that build() has not been called yet, then mark as built.
Protected Attributes inherited from ucxx::RequestCallbackBuilderBase< RequestEndpointCloseBuilder >
RequestCallbackUserFunction _callbackFunction
 User callback on completion.
RequestCallbackUserData _callbackData
 Data passed to callback.
Protected Attributes inherited from ucxx::RequestBuilderBase< RequestEndpointCloseBuilder >
bool _enablePythonFuture
 Enable Python future support.
bool _built
 Whether build() has already been called.

Detailed Description

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

Request builders capture the arguments required to create a request and expose optional settings through fluent setters. Construction happens when build() is called or when the builder is implicitly converted to a compatible std::shared_ptr.

Request builders are move-only and single-use. Calling build() or implicitly converting the same builder object more than once throws std::logic_error. The builder is consumed before request validation or construction completes; if that first attempt throws, retrying the same builder still throws std::logic_error.

Request builder objects are not thread-safe. Accessing the same builder object from multiple threads requires external synchronization. Distinct builder objects are independent.

Each request-specific factory function returns the corresponding builder. Required arguments are passed to the factory function, while optional settings such as Python future notification and completion callbacks are configured through method chaining when supported by that request type.

The endpoint and requestData are required and must be provided to requestEndpointCloseBuilder(). Building the request preserves ucxx::Endpoint::closeBuilder() lifecycle semantics: only one close request may be submitted for an endpoint.

auto req = ucxx::requestEndpointCloseBuilder(endpoint, closeData)
.pythonFuture(true)
.callbackFunction(callback)
.build();
std::shared_ptr<ucxx::RequestEndpointClose> closeReq =
ucxx::requestEndpointCloseBuilder(endpoint, closeData);
Derived & pythonFuture(bool enable=true) &
Configure Python future support.
Definition request_builder_base.h:86
Derived & callbackData(RequestCallbackUserData data) &
Set the user-defined data to pass to the callback function.
Definition request_builder_base.h:151
Derived & callbackFunction(RequestCallbackUserFunction fn) &
Set the user-defined callback function to call upon completion.
Definition request_builder_base.h:127
std::shared_ptr< RequestEndpointClose > build()
Build and return the RequestEndpointClose.
RequestEndpointCloseBuilder requestEndpointCloseBuilder(std::shared_ptr< Endpoint > endpoint, data::EndpointClose requestData)
Create a RequestEndpointCloseBuilder for constructing a shared_ptr<ucxx::RequestEndpointClose>.
Definition request_endpoint_close_builder.h:89

Constructor & Destructor Documentation

◆ RequestEndpointCloseBuilder()

ucxx::RequestEndpointCloseBuilder::RequestEndpointCloseBuilder ( std::shared_ptr< Endpoint > endpoint,
data::EndpointClose requestData )
explicit

Constructor for RequestEndpointCloseBuilder with required parameters.

Parameters
[in]endpointthe std::shared_ptr<Endpoint> parent component.
[in]requestDatacontainer of the endpoint close request data.

Member Function Documentation

◆ build()

std::shared_ptr< RequestEndpointClose > ucxx::RequestEndpointCloseBuilder::build ( )
nodiscard

Build and return the RequestEndpointClose.

Returns
The constructed shared_ptr<ucxx::RequestEndpointClose> object, or nullptr if the endpoint has already closed or is already in process of closing.

◆ operator std::shared_ptr< Request >()

ucxx::RequestEndpointCloseBuilder::operator std::shared_ptr< Request > ( )

Implicit conversion operator to shared_ptr<Request>.

Returns
The constructed request as shared_ptr<ucxx::Request>, or nullptr if the endpoint has already closed or is already in process of closing.

◆ operator std::shared_ptr< RequestEndpointClose >()

ucxx::RequestEndpointCloseBuilder::operator std::shared_ptr< RequestEndpointClose > ( )

Implicit conversion operator to shared_ptr<RequestEndpointClose>.

Returns
The constructed shared_ptr<ucxx::RequestEndpointClose> object, or nullptr if the endpoint has already closed or is already in process of closing.

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