Apama  10.1.0.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_Context Class Referenceabstract

#include <correlator_plugin.hpp>

Inherits NoContext public AP_Context.

Public Member Functions

virtual ~AP_Context ()
 
virtual uint32 version () const =0
 
virtual char8 * char8alloc (size_t len) const =0
 
virtual char8 * char8dup (const char8 *s) const =0
 
virtual void char8free (char8 *s) const =0
 
virtual AP_CorrelatorInterfacegetCorrelator () const =0
 
virtual AP_uint64 getContextId () const =0
 
virtual void pluginNowBlocking () const =0
 

Detailed Description

Deprecated:
Execution context for a library function call.

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.

Deprecated:
For passing to a function that needs to take an AP_Context& from a plugin thread that doesn't have an AP_Context.

Provides dummy do-nothing methods for all the methods on AP_Context.

Constructor & Destructor Documentation

virtual AP_Context::~AP_Context ( )
inlinevirtual
Deprecated:
Destructor

Member Function Documentation

virtual char8* AP_Context::char8alloc ( size_t  len) const
pure virtual
Deprecated:
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.

Parameters
lenThe length of the string buffer. Must be sufficient to cover any terminators or other special characters to be included in the string.
Returns
Pointer to a memory block of at least len bytes.
virtual char8* AP_Context::char8dup ( const char8 *  s) const
pure virtual
Deprecated:
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().

Parameters
sThe source string to be copied. Must have been created with char8alloc().
Returns
Pointer to a copy of the source string.
virtual void AP_Context::char8free ( char8 *  s) const
pure virtual
Deprecated:
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().

Parameters
sThe source string to be freed.
virtual AP_uint64 AP_Context::getContextId ( ) const
pure virtual
Deprecated:
Return the identifier of the EPL (parallelism) context associated with this plugin execution context.
virtual AP_CorrelatorInterface* AP_Context::getCorrelator ( ) const
pure virtual
Deprecated:
Return the correlator implementation.
virtual void AP_Context::pluginNowBlocking ( ) const
pure virtual
Deprecated:
Called by the plugin when it performs a potentially blocking operation.

This form is slightly more efficient than the call on AP_CorrelatorInterface.

virtual uint32 AP_Context::version ( ) const
pure virtual
Deprecated:
Return active plugin API version

The documentation for this class was generated from the following file: