NPRPC docs

class PoaBuilder

C++

class PoaBuilder

Configures a POA; get one from Rpc::create_poa() and finish with build().

auto poa = rpc->create_poa()
               .with_max_objects(64)
               .with_lifespan(nprpc::PoaPolicy::Lifespan::Persistent)
               .build();

include/nprpc/nprpc.hpp:277

Constructors

explicit PoaBuilder(Rpc *rpc)

include/nprpc/nprpc.hpp:290

Methods

Poa *build()

Creates the POA. The runtime owns it: do not delete it, call Rpc::destroy_poa to remove it.

include/nprpc/nprpc.hpp:336

PoaBuilder &with_dispatch_executor(DispatchExecutor ex)

Route servant dispatch through ex (post+wait). Empty = inline. Setting a non-empty executor implies off-transport dispatch for SHM (same effect as NeverBlockTransport for the ring hand-off decision).

include/nprpc/nprpc.hpp:328

PoaBuilder &with_lifespan(PoaPolicy::Lifespan policy)

Whether objects are reference counted or live until deactivated. Default: Transient.

include/nprpc/nprpc.hpp:304

PoaBuilder &with_max_objects(uint32_t max)

Maximum number of objects active at once. Default: 32.

include/nprpc/nprpc.hpp:296

PoaBuilder &with_object_id_policy(PoaPolicy::ObjectIdPolicy policy)

Whether the POA assigns object ids or the caller does. Default: SystemGenerated.

include/nprpc/nprpc.hpp:312

PoaBuilder &with_transport_affinity(PoaPolicy::TransportAffinity affinity)

Prefer / forbid servant dispatch on the transport (e.g. SHM ring) thread.

include/nprpc/nprpc.hpp:319