Skip to content

API · fair::mq::shmem

TransportFactoryclass

#include <TransportFactory.h>fairmq/shmem/TransportFactory.h:36GitHub ↗
Inherits from
fair::mq::TransportFactory

No comment in the header yet.

Functions

virtual MessagePtr CreateMessage(
    void* data,
    size_t size,
    fair::mq::FreeFn* ffn,
    void* hint = nullptr
) override

Create new Message with user provided buffer and size.

data
pointer to user provided buffer
size
size of the user provided buffer
ffn
callback, called when the message is transfered (and can be deleted)
obj
optional helper pointer that can be used in the callback
Returns
pointer to Message
virtual MessagePtr CreateMessage(
    UnmanagedRegionPtr& unmanagedRegion,
    void* data,
    size_t size,
    void* hint = nullptr
) override

create a message with the buffer located within the corresponding unmanaged region

unmanagedRegion
the unmanaged region that this message buffer belongs to
data
message buffer (must be within the region - checked at runtime by the transport)
size
size of the message
hint
optional parameter, returned to the user in the RegionCallback
virtual PollerPtr CreatePoller(
    const std::unordered_map<std::string, std::vector<Channel>>& channelsMap,
    const std::vector<std::string>& channelList
) const override

Create a poller for specific channels (all subchannels)

virtual UnmanagedRegionPtr CreateUnmanagedRegion(
    size_t size,
    RegionCallback callback = nullptr,
    const std::string& path = "",
    int flags = 0,
    fair::mq::RegionConfig cfg = fair::mq::RegionConfig()
) override

Create new UnmanagedRegion.

size
size of the region
callback
callback to be called when a message belonging to this region is no longer needed by the transport
path
optional parameter to pass to the underlying transport
flags
optional parameter to pass to the underlying transport
Returns
pointer to UnmanagedRegion
virtual UnmanagedRegionPtr CreateUnmanagedRegion(
    size_t size,
    int64_t userFlags,
    RegionCallback callback = nullptr,
    const std::string& path = "",
    int flags = 0,
    fair::mq::RegionConfig cfg = fair::mq::RegionConfig()
) override

Create new UnmanagedRegion.

size
size of the region
userFlags
flags to be stored with the region, have no effect on the transport, but can be retrieved from the region by the user
callback
callback to be called when a message belonging to this region is no longer needed by the transport
path
optional parameter to pass to the underlying transport
flags
optional parameter to pass to the underlying transport
Returns
pointer to UnmanagedRegion