MqDumpC - various functions to create, initialize and destroy a dump …
More...
MqDumpC - various functions to create, initialize and destroy a dump …
◆ MqDumpBinSet
#define MqDumpBinSet |
( |
| ... | ) |
|
◆ MqDumpBinSet_C
#define MqDumpBinSet_C |
( |
| ... | ) |
|
◆ MqDumpBinSet_E
#define MqDumpBinSet_E |
( |
| ... | ) |
|
◆ MqDumpBinSet_e
#define MqDumpBinSet_e |
( |
| ... | ) |
|
◆ MqDumpBinSet_NULL
#define MqDumpBinSet_NULL |
( |
| ... | ) |
|
◆ MqDumpDelete
#define MqDumpDelete |
( |
| x | ) |
|
◆ MqDumpError
#define MqDumpError |
( |
| ... | ) |
|
◆ MqDumpError_C
#define MqDumpError_C |
( |
| ... | ) |
|
◆ MqDumpError_E
#define MqDumpError_E |
( |
| ... | ) |
|
◆ MqDumpError_e
#define MqDumpError_e |
( |
| ... | ) |
|
◆ MqDumpError_NULL
#define MqDumpError_NULL |
( |
| ... | ) |
|
◆ MqDumpExport
#define MqDumpExport |
( |
| ... | ) |
|
◆ MqDumpExport_C
#define MqDumpExport_C |
( |
| ... | ) |
|
◆ MqDumpExport_E
#define MqDumpExport_E |
( |
| ... | ) |
|
◆ MqDumpExport_e
#define MqDumpExport_e |
( |
| ... | ) |
|
◆ MqDumpExport_NULL
#define MqDumpExport_NULL |
( |
| ... | ) |
|
◆ MqDumpImport
#define MqDumpImport |
( |
| ... | ) |
|
◆ MqDumpImport_C
#define MqDumpImport_C |
( |
| ... | ) |
|
◆ MqDumpImport_E
#define MqDumpImport_E |
( |
| ... | ) |
|
◆ MqDumpImport_NULL
#define MqDumpImport_NULL |
( |
| ... | ) |
|
◆ MqDumpBinGet()
export the binary data from an MqDumpS
object
- Parameters
-
[in] | dump | the source object |
- Returns
- The required MkBinaryR
- Attention
- The data still belongs to the
MqDumpS
object… do NOT free.
MQ_DMPN const dump
) {
return (MkBinaryR) {dump->size, (
MK_BIN)dump};
}
◆ MqDumpBinSet_RT()
create an MqDumpS
object from binary data
Check the MqDumpC_SIGNATURE and set the refCount to 0
- Parameters
-
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | data | the binary data |
[out] | dmp_out | the new MqDumpC |
- Exceptions
-
- Attention
- The
MqDumpS
object is an pointer object… this mean the original data is still required and must NOT be freed.
MkBinaryR bin,
MQ_DMP *dmp_out
) {
assert(bin.data != NULL);
assert(dmp_out!=NULL);
return MkErrorDbV_2_M(
MK_ERROR_PRINT,MK_ERROR_VALUE_INVALID,
"signature",
"MqDumpS");
} else {
}
*dmp_out = dump;
}
◆ MqDumpDelete_RT()
void libmqmsgque::MqDumpDelete_RT |
( |
MK_RT | mkrt, |
|
|
MQ_DMP | dmp ) |
◆ MqDumpError_RT()
export the context->error into the dump-package …
The export include all data required to setup a read-data-package later again. After import with MqDumpImport the read-data-package and the environment will be set as it was on MqDumpExport The export can be saved into an external storage or be used in a network-tunnel (example: the agurad tool).
- Parameters
-
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | error | the error-context to be exported into the dump-package-data |
[in,out] | dumpP_inout | the reference object or MK_NULL at error |
- The reference object have to be non
MK_NULL
.
- If reference object is a refrence to a non
MK_NULL
object than the reference object is populated with the result.
- If reference object is a refrence to a
MK_NULL
object than :
- The reference object is set to the TLS alocated object owned by the Programming-Language-Micro-Kernel (PLMK).
- (do not free) The memory of the reference object value belongs to the called ccmqmsgque function and therefore never becomes
MK_NULL
for a non-error result.
For details on the reference object value, see: MkKernel_Storage_C_API.
- The newly created reference-object is owned by the caller.
- Exceptions
-
- Attention
- 1. use remarks from MqDumpExport
2. MqDumpError using the send-data-package to create the dump-package.. to use the send-data-package afterwords a MqSendSTART is required
- See also
- MqStorageExport, MqDumpImport, MqDumpExport
◆ MqDumpExport_RT()
create a MqDumpC as export of the ctx-read-data-package …
The new instance belongs to the caller and may have to be released if necessary. A manual release using DumpDelete is always possible, but the instance can no longer be used afterwards.
The export include all data required to setup a read-data-package again later. After import with MqDumpImport the read-data-package and the environment will be set as it was on MqDumpExport The export can be saved into an external storage or be used in a network-tunnel (example: the aguard tool).
- Parameters
-
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | ctx | the context to be exported into the dump-package-data |
[in,out] | dumpP_inout | the reference object or MK_NULL at error |
- The reference object have to be non
MK_NULL
.
- If reference object is a refrence to a non
MK_NULL
object than the reference object is populated with the result.
- If reference object is a refrence to a
MK_NULL
object than :
- The reference object is set to the TLS alocated object owned by the Programming-Language-Micro-Kernel (PLMK).
- (do not free) The memory of the reference object value belongs to the called ccmqmsgque function and therefore never becomes
MK_NULL
for a non-error result.
For details on the reference object value, see: MkKernel_Storage_C_API.
- The newly created reference-object is owned by the caller.
- Exceptions
-
- See also
- MqStorageExport, MqDumpImport, MqDumpError
- Attention
- 1. The goal of this function is to create a dump to be loaded in the context later. If the context is not the original context… propably additional work is necessary.
2. The MqDumpExport is using realloc to allocate space. The value of *value should be initialized with either MK_NULL
or a result of a previous MqDumpExport or MqDumpError.
3. Garbage is detected using MqDumpC_SIGNATURE… there is a MINIMAL chance (1 to 4.294.967.295) that the gargabe is NOT detected… to be save… always initialize the dump.
4. If the dump was initialized with MK_NULL
or garbage … new memory will be allocated… If the dump memory will NOT be reused… free the memory with (6.)
5. If the dump was initialized with an previous dump … the memory will be reused… and extended with realloc if required.
6. Free the memory with MqDumpDelete.
7. On error… the dump is unchanged.
8. In case of TLS memory returned read more at MkKernel_Storage_C_API.
◆ MqDumpImport_RT()
import the dump-package into the ctx-read-data-package …
The dump is the result of a previous MqDumpExport function call. After the load an package is suitable for all kind of MqContextC READ API function. To just forward the package use the MqProxyForward function.
- Parameters
-
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | dump | the dump-package to be imported |
[in] | ctx | the context in wich the dump-package is imported |
- Exceptions
-
- Attention
- - The memory is dynamic-allocated and can be reused for the next MqDumpExport.
- (do not free) The memory of the out/return value belongs to the called ccmqmsgque function and therefore never becomes
MK_NULL
for a non-error result.
For details on the out/return value, see: MkKernel_Storage_C_API.
- See also
- MqStorageExport, MqDumpExport, MqDumpError