MqFactoryC - the class known as fct or factory is used to provide an interface to create one or more new MqContextC …
More...
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:
- create/delete a MqContextC defined by a MqFactoryC
- infrastructure to host multiple MqFactoryC in a single executable
- provide an identifier used for factory-lookup and as an unique-application-name
- identification of a client and a server in an application-link
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 ccmqmsgque. 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 libmqmsgque::MqSetupS attribute of the the MqContextC object, will move into MqFactoryC object.
◆ Check()
bool ccmqmsgque::MqFactoryC::Check |
( |
| ) |
const |
|
inline |
check if pointer is still valid
Definition at line 151 of file MqFactoryC_cc.hh.
151 {
153 };
static bool MqFctCheck(MK_MNGN mng)
check MqFactoryS -> libmkkernel::MkObjectS::signature …
◆ getFCT() [1/3]
MQ_FCT ccmqmsgque::MqFactoryC::getFCT |
( |
| ) |
const |
|
inline |
return the LibMsgqueObject from current MqFactoryC instance
Definition at line 83 of file MqFactoryC_cc.hh.
83 {
85 if (
unlikely(ret == NULL)) InstHdlIsNullError();
86 return ret;
87 };
struct MqFactoryS * MQ_FCT
class-shortcut for struct MqFactoryS *, all shortcut using the XX_YYY syntax (only for public API) …
◆ getFCT() [2/3]
return LibMsgqueObject from current MqFactoryC reference
Definition at line 131 of file MqFactoryC_cc.hh.
131 {
132 return clsHdl.getFCT();
133 };
◆ getFCT() [3/3]
◆ getFCT__null_allow() [1/3]
MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow |
( |
| ) |
const |
|
inline |
◆ getFCT__null_allow() [2/3]
static MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow |
( |
const MqFactoryC & | clsHdl | ) |
|
|
inlinestatic |
return LibMsgqueObject from current MqFactoryC reference
Definition at line 136 of file MqFactoryC_cc.hh.
136 {
137 return clsHdl.getFCT__null_allow();
138 };
◆ getFCT__null_allow() [3/3]
return LibMsgqueObject from current MqFactoryC pointer
Definition at line 114 of file MqFactoryC_cc.hh.
114 {
115 return clsHdl ?
reinterpret_cast<MQ_FCT>(clsHdl->hdl) : NULL;
116 };
◆ getFCTN() [1/3]
MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN |
( |
| ) |
const |
|
inline |
(const) return the LibMsgqueObject from current MqFactoryC instance
Definition at line 95 of file MqFactoryC_cc.hh.
95 {
97 if (
unlikely(ret == NULL)) InstHdlIsNullError();
98 return ret;
99 };
const struct MqFactoryS * MQ_FCTN
class-shortcut for const struct MqFactoryS *, all const shortcut using the XX_YYYC syntax (only for p...
◆ getFCTN() [2/3]
(const) return LibMsgqueObject from current MqFactoryC reference
Definition at line 141 of file MqFactoryC_cc.hh.
141 {
142 return clsHdl.getFCTN();
143 };
◆ getFCTN() [3/3]
◆ getFCTN__null_allow() [1/3]
MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow |
( |
| ) |
const |
|
inline |
◆ getFCTN__null_allow() [2/3]
static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow |
( |
const MqFactoryC & | clsHdl | ) |
|
|
inlinestatic |
(const) return LibMsgqueObject from current MqFactoryC reference
Definition at line 146 of file MqFactoryC_cc.hh.
146 {
147 return clsHdl.getFCTN__null_allow();
148 };
◆ getFCTN__null_allow() [3/3]
static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow |
( |
const MqFactoryC * | clsHdl | ) |
|
|
inlinestatic |
(const) return LibMsgqueObject from current MqFactoryC pointer
Definition at line 126 of file MqFactoryC_cc.hh.
126 {
127 return clsHdl ?
reinterpret_cast<MQ_FCTN>(clsHdl->hdl) : NULL;
128 };
◆ MqFactoryC() [1/3]
ccmqmsgque::MqFactoryC::MqFactoryC |
( |
| ) |
|
|
inlineprivate |
◆ MqFactoryC() [2/3]
ccmqmsgque::MqFactoryC::MqFactoryC |
( |
MK_OBJ | obj | ) |
|
|
inlineprivate |
◆ MqFactoryC() [3/3]
ccmqmsgque::MqFactoryC::MqFactoryC |
( |
MQ_FCT | hdl | ) |
|
|
inline |
◆ MqFactoryC_GetSelf()
Definition at line 39 of file MqFactoryC_cc.hh.
39 {
41 }
static thread_local MqFactoryC MK_NULL_REF
◆ MqFactoryC_Init()
void ccmqmsgque::MqFactoryC::MqFactoryC_Init |
( |
MQ_FCT | hdl | ) |
|
|
inlineprivate |
◆ MqFactoryC_ObjCreate()
Definition at line 63 of file MqFactoryC_cc.hh.
63 {
65 }
static MK_PTR atomObjCreate(MK_RT_ARGS MK_OBJ obj)
◆ MqFactoryC_ObjNew()
return MqFactoryC from LibMsgqueObject
Definition at line 78 of file MqFactoryC_cc.hh.
78 {
80 }
static MK_PTR atomObjNew(MK_RT_ARGS MK_OBJ obj)
◆ MqFactoryC_selfCreate()
◆ MqFactoryC_selfDelete()
◆ MqFactoryC_selfUnlink()
◆ MK_NULL_REF