Builder class for constructing std::shared_ptr<ucxx::RequestStream> objects. More...
#include <request_stream_builder.h>
Public Member Functions | |
| RequestStreamBuilder (std::shared_ptr< Endpoint > endpoint, std::variant< data::StreamSend, data::StreamReceive > requestData) | |
| Constructor for RequestStreamBuilder with required parameters. | |
| std::shared_ptr< RequestStream > | build () |
| Build and return the RequestStream. | |
| operator std::shared_ptr< RequestStream > () | |
| Implicit conversion operator to shared_ptr<RequestStream>. | |
| operator std::shared_ptr< Request > () | |
| Implicit conversion operator to shared_ptr<Request>. | |
| Public Member Functions inherited from ucxx::RequestBuilderBase< RequestStreamBuilder > | |
| RequestBuilderBase ()=default | |
| Default constructor. | |
| RequestBuilderBase & | operator= (const RequestBuilderBase &)=delete |
| Copy assignment disabled to prevent duplicate request submissions. | |
| RequestStreamBuilder & | pythonFuture (bool enable=true) & |
| Configure Python future support. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ucxx::RequestBuilderBase< RequestStreamBuilder > | |
| void | markBuilt () |
| Assert that build() has not been called yet, then mark as built. | |
| Protected Attributes inherited from ucxx::RequestBuilderBase< RequestStreamBuilder > | |
| bool | _enablePythonFuture |
| Enable Python future support. | |
| bool | _built |
| Whether build() has already been called. | |
Builder class for constructing std::shared_ptr<ucxx::RequestStream> 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 requestStreamBuilder(). The pythonFuture() method is optional.
|
explicit |
Constructor for RequestStreamBuilder with required parameters.
| [in] | endpoint | the std::shared_ptr<Endpoint> parent component. |
| [in] | requestData | container of the specified message type, including all type-specific data. |
|
nodiscard |
Build and return the RequestStream.
| ucxx::RequestStreamBuilder::operator std::shared_ptr< Request > | ( | ) |
Implicit conversion operator to shared_ptr<Request>.
| ucxx::RequestStreamBuilder::operator std::shared_ptr< RequestStream > | ( | ) |
Implicit conversion operator to shared_ptr<RequestStream>.