Apama
9.10.0.4.289795
|
Execution context for a library function call. More...
#include <correlator_plugin.hpp>
Inherits NoContext public AP_Context.
Public Member Functions | |
virtual | ~AP_Context () |
Destructor. More... | |
virtual uint32 | version () const =0 |
Return active plugin API version. More... | |
virtual char8 * | char8alloc (size_t len) const =0 |
Allocate storage for an 8-bit string value. More... | |
virtual char8 * | char8dup (const char8 *s) const =0 |
Duplicate a string value created using char8alloc(). More... | |
virtual void | char8free (char8 *s) const =0 |
Free the memory occupied by a string created using char8alloc() or char8dup(). More... | |
virtual AP_CorrelatorInterface * | getCorrelator () const =0 |
Return the correlator implementation. More... | |
virtual AP_uint64 | getContextId () const =0 |
Return the identifier of the EPL (parallelism) context associated with this plugin execution context. More... | |
virtual void | pluginNowBlocking () const =0 |
Called by the plugin when it performs a potentially blocking operation. More... | |
Execution context for a library function call.
For passing to a function that needs to take an AP_Context& from a plugin thread that doesn't have an AP_Context.
Note that the plugin 'execution context' is not the same as the concept of 'contexts' in EPL, which are used to provide parallelism, despite the name being the same. However each AP_Context plugin execution context provides a getContextId() method for getting the EPL context from which the plugin is being invoked.
AP_Context holds per-call Engine-internal data and provides various utility functions to plugins.
Note that the implementation of the AP_Context member functions is internal to the Engine. One consequence of this is that plugins cannot create a useful instance of this class themselves; the only valid AP_Context objects are those passed in to a plugin function by the Engine.
Provides dummy do-nothing methods for all the methods on AP_Context.
|
inlinevirtual |
Destructor.
|
pure virtual |
Allocate storage for an 8-bit string value.
The memory will be allocated by the Engine and must only be freed using the char8free() function. These functions should be used for any string data that may need to be copied or otherwise manipulated by the Engine; in particular, strings within chunk objects that the Engine may be required to (de)serialise.
len | The length of the string buffer. Must be sufficient to cover any terminators or other special characters to be included in the string. |
|
pure virtual |
Duplicate a string value created using char8alloc().
This function allocates a memory block of sufficient size and copies the contents of the source string into it. The returned string must only be freed using char8free().
s | The source string to be copied. Must have been created with char8alloc(). |
|
pure virtual |
Free the memory occupied by a string created using char8alloc() or char8dup().
The source string pointer is invalid after this function returns. This function must not be used to free any object that was not allocated by char8alloc() or char8dup().
s | The source string to be freed. |
|
pure virtual |
Return the identifier of the EPL (parallelism) context associated with this plugin execution context.
|
pure virtual |
Return the correlator implementation.
|
pure virtual |
Called by the plugin when it performs a potentially blocking operation.
This form is slightly more efficient than the call on AP_CorrelatorInterface.
|
pure virtual |
Return active plugin API version.