arm_init_transaction_type() — Defines and initializes an ARM transaction type
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
both |
Format
#include <sys/_Elmarm4.h>
arm_error_t arm_init_transaction_type(
/* [in] */ arm_appl_id_t *application_id,
/* [in] */ arm_string_t transaction_name,
/* [in] */ arm_int32_t flags,
/* [in] */ arm_buffer4_t *buffer4,
/* [in/out] */ arm_appl_id_t *transaction_type_id
);
General description
Use arm_init_transaction_type() to define a transaction classtype. A transaction type represents a type of transaction that is executed by an application. A transaction type must be defined before transactions of that type can be measured using arm_start_transaction() and arm_stop_transaction().
A transaction type consists of a transaction type name and a list of up to 20 transaction property names. Multiple transaction types with the same transaction type name and different transaction property names are allowed. It is the complete set of names that determines the uniqueness of a transaction type.
It is recommended that transaction types be defined during the application's initialization. eWLM expects transaction types to represent broad categories of work so that ordinarily there will be few of them. Detailed transaction identification should be done using the transaction-level properties.
Transaction types also can be defined as needed, during the application's processing of transactions. The ARM implementation must check whether there is an existing definition of the same type to prevent duplicates. Since this adds further overhead into mainline processing, this approach is not recommended.
Transaction classtype definitions remain valid for the life of the application (i.e. until it calls arm_end_application() or its process terminates).
- application_id
- The handle passed to or returned by arm_init_application() for the application associated with this transaction type.
- transaction_name
- The name used to identify the transaction type. The maximum length is 128 characters including the null string terminator. Classification rules in the eWLM policy can use the transaction type name to categorize transactions into eWLM service classes and report classes.
- flags
- One flag is defined. ARM_INIT_FLAG_ID_INPUT indicates whether the transaction type id is an input (flag is one) or an output (flag is zero). See the transaction type id parameter below. All other flag bits are reserved and must be zero.
- buffer4
- A pointer to a buffer that identifies one or more sub-buffers containing additional data. A null value can be specified if no additional data is required.
- transaction_type_id
- A pointer to a 64-bit handle that identifies the transaction type. The application can define its own handle and pass it as input or it can have eWLM generate a handle and return it. The choice is indicated by the flag ARM_INIT_FLAG_ID_INPUT. The handle must be passed to arm_start_transaction(). The handle is defined only within the caller's process. If eWLM is asked to generate a handle and the transaction type name and the transaction property names (in the user data buffer) match the names passed on a previous arm_init_transaction_type() call, the handle value that is returned will be the same as the previous call.
Returned value
- Error Code
- Description
- EFAULT
- A parameter of this service contained an address that was not accessible to the caller.
- EINVAL
- A parameter of this service contained a value that was not valid.
- EMVSARMERROR
- An ARM error occurred. Refer to the return code for the specific error.
- EPERM
- The caller does not have the appropriate privileges. The return code is set to ARM_RC_AUTH_ERROR.
- EMVSSAF2ERR
- An error occurred in the security product.
Related information
- arm_bind_thread() — Bind the current thread to a given transaction
- arm_blocked() — Indicate the processing of a transaction is blocked
- arm_correlator_get_length() — Get the actual size of the transaction correlator
- arm_end_application() — Undefines an ARM application
- arm_get_correlator_max_length() — Get the max length of the transaction correlator
- arm_get_timestamp() — Get the current timestamp
- arm_init_application() — Defines an ARM application
- arm_start_transaction() — Mark the start of an ARM transaction
- arm_stop_transaction() — Mark the end of an ARM transaction
- arm_unbind_thread() — Unbind the current thread to a given transaction
- arm_unblocked() — Indicate the processing of a transaction is no longer blocked
- arm_update_transaction() — Update a given transaction