MqFactoryC - the class known as fct or factory is used to provide an interface to create one or more new MqContextC … More...
Topics | |
MqFactoryC_Class_C_API | |
MqFactoryC - define the class … | |
MqFactoryC_TOR_C_API | |
MqFactoryC - various functions to create, initialize and destroy a factory … | |
MqFactoryC_Get_C_API | |
MqFactoryC - various functions to 'get' data out of a factory … | |
MqFactoryC_Misc_C_API | |
MqFactoryC - various functions to work on a factory … | |
Data Structures | |
struct | MqFactoryCTorS |
interface for the constructor More... | |
struct | MqFactoryDTorS |
interface for the destructor More... | |
struct | MqFactoryS |
data used to define a factory More... | |
Macros | |
#define | MqFactoryPanic(fct) |
#define | MQ_CALLBACK_FACTORY_CTOR_ARGS |
the MqFactoryCTorF arguments with default names | |
#define | MQ_CALLBACK_FACTORY_CTOR_CALL MQ_RT_CALL tmpl, create, fct, contextP |
Typedefs | |
typedef enum MkErrorE(* | MqFactoryCTorF) (MK_RT mkrt, MQ_RT mqrt, MQ_CTX const tmpl, enum MqFactoryE create, MQ_FCT const fct, MQ_CTX *ctx_out) |
type of a MqFactoryC constructor | |
typedef void(* | MqFactoryDTorF) (MK_RT mkrt, MQ_CTX ctx, bool doFactoryCleanup, MQ_FCT const fct) |
type of a MqFactoryC destructor | |
typedef void(* | MqFactoryDataFreeF) (MK_RT mkrt, MK_PTR *dataP) |
prototype for a free additional factory data function | |
typedef void(* | MqFactoryDataCopyF) (MK_RT mkrt, MK_PTR *dataP) |
prototype for a copy additional factory data function | |
MqFactoryC - the class known as fct or factory is used to provide an interface to create one or more new MqContextC …
The factory is an important part of the object management and has the following basic features:
Without a factory only the pipe-feature without the child-feature is guaranteed to work. Other features may work, this depends of the "flexibility" of the programming-language.
The link between the MqFactoryS-identifier and the MqFactoryC is important for the future development of pymqmsgque. Message-Routing, Service-Location and Persistent-Transactions depend on this feature.
The relationship between the MqFactoryC and the MqContextC is the same as the relationship between a type (MqFactoryS) and an object (MqContextS) of a regular programming language. The MqFactoryC define the type of the server and the MqContextC define a single object of the server process or thread.
Application |-------------------------------------------------------------------------------------| |--------------- physical host 1 -----------------------|------ physical host 2 ------| |-------- process-1 --------|-------- process-2 --------|-- process-3 --|---- … ------| thread-1 thread-2… thread-1… thread-2… thread-1… thread-… factory-A factory-X factory-Y… factory-Z… object-1 object-1 object-… … object-2 object-2 … object-3 object-3 … …
A server has a single MqFactoryC object per thread or process but multiple MqFactoryC objects per application. Decreasing the size and the complexity of a MqContextC object will improve the server performance. In future more fields, defined in the MqSetupS attribute of the the MqContextC object, will move into MqFactoryC object.
#define MQ_CALLBACK_FACTORY_CTOR_ARGS |
the MqFactoryCTorF arguments with default names
Definition at line 3057 of file LibMqMsgque_mq.h.
#define MQ_CALLBACK_FACTORY_CTOR_CALL MQ_RT_CALL tmpl, create, fct, contextP |
Definition at line 3064 of file LibMqMsgque_mq.h.
#define MqFactoryPanic | ( | fct | ) |
Definition at line 3036 of file LibMqMsgque_mq.h.
typedef enum MkErrorE( * MqFactoryCTorF) (MK_RT mkrt, MQ_RT mqrt, MQ_CTX const tmpl, enum MqFactoryE create, MQ_FCT const fct, MQ_CTX *ctx_out) |
type of a MqFactoryC constructor
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | mqrt | the MqRuntimeS instance to work on - the runtime argument, used by MQ_RT_CALL (C-only) |
[in] | tmpl | the calling object to initialize the configuration data using MqSetupDup |
[in] | create | how is the factory constructor used |
[in] | fct | factory interface in use |
[out] | ctx_out | the new object |
MkExceptionC | → The default-exception from the Programming-Language-Micro-Kernel (PLMK) |
Definition at line 2965 of file LibMqMsgque_mq.h.
prototype for a copy additional factory data function
Definition at line 3097 of file LibMqMsgque_mq.h.
prototype for a free additional factory data function
Definition at line 3089 of file LibMqMsgque_mq.h.
type of a MqFactoryC destructor
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | ctx | the MqContextS instance to work on |
[in] | doFactoryCleanup | was the object created with a factory ?
|
[in] | fct | factory-interface used to create the object, the factory entry at MqSetupS::factory was set to None in MqContextCreate to garantee a one time execution of this code |
Definition at line 3079 of file LibMqMsgque_mq.h.