User-Defined Function API 11.0
|
The MarkLogic Server native plugin registry. More...
#include <MarkLogic.h>
Public Member Functions |
|
void | version (unsigned pluginVersion=makeVersion(__DATE__, __TIME__), unsigned marklogicVersion=MARKLOGIC_API_VERSION) |
Register the version of your plugin library and the version of the MarkLogic Server Native Plugin API with which your plugin is compatible. More... |
|
template<class T > | |
void | registerAggregate (const char *name) |
Register an AggregateUDF implementation with MarkLogic Server. More... |
|
virtual void | registerAggregate (const char *name, AggregateFunction f)=0 |
Register an AggregateUDF implementation with MarkLogic Server. More... |
|
template<class T > | |
void | registerLexer (const char *name) |
Register a LexerUDF implementation with MarkLogic Server. More... |
|
virtual void | registerLexer (const char *name, LexerFunction f)=0 |
Register a LexerUDF implementation with MarkLogic Server. More... |
|
template<class T > | |
void | registerStemmer (const char *name) |
Register a StemmerUDF implementation with MarkLogic Server. More... |
|
virtual void | registerStemmer (const char *name, StemmerFunction f)=0 |
Register a StemmerUDF implementation with MarkLogic Server. More... |
|
Protected Attributes |
|
unsigned | pluginVersion |
The MarkLogic Server native plugin registry.
You do not need to implement a subclass of this class.
MarkLogic server uses this interface to register and track native plugins. Your native plugin library must implement an extern "C" function called marklogicPlugin
with the interface shown below. Your marklogicPlugin function must register the version of your plugin library and any interfaces exported by the library, such as an implementation of AggregateUDF. For example:
For more information, see "Registering a Native Plugin at Runtime" in the Application Developer's Guide.
|
inline |
Register an AggregateUDF implementation with MarkLogic Server.
This registration step gives MarkLogic Server a handle to a master object of your AggregateUDF subclass (T). The master object is used to clone additional objects to execute a MapReduce job and the map and reduce tasks within the job whenever your aggregate function is invoked.
Use this registration method to use the default object factory, which uses the default allocator and your AggregateUDF subclass default constructor.
name | The name of your aggregate function. Applications will invoke your aggregate function using this name and the relative path to your installed plugin. |
|
pure virtual |
Register an AggregateUDF implementation with MarkLogic Server.
This registration step gives MarkLogic Server a handle to a master object of your AggregateUDF subclass (T). The master object is used to clone additional objects to execute a MapReduce job and the map and reduce tasks within the job whenever your aggregate function is invoked.
Use this registration method to supply a custom object factory function when using a custom allocator and/or constructor for your Aggregate UDF subclass. The object allocated by your factory functionn must persist until its close() method is called.
name | The name of your aggregate function. Applications will invoke your aggregate function using this name and the relative path to your installed plugin. |
f | The object factory function with which to allocate objects of your AggregateUDF class. |
|
inline |
Register a LexerUDF implementation with MarkLogic Server.
This registration step gives MarkLogic Server a handle to an instance of your LexerUDF subclass (T). Multiple instances may be constructed and stored in a pool for reuse.
Use this registration method to use the default object factory, which uses the default allocator and your LexerUDF subclass default constructor.
name | The name of your lexer function. The language customization configuration will use this name with the relative path to your installed plugin to indicate that your lexer function should be used. |
|
pure virtual |
Register a LexerUDF implementation with MarkLogic Server.
This registration step gives MarkLogic Server a handle to an instance of your LexerUDF subclass (T). Multiple instances may be constructed and stored in a pool for reuse.
Use this registration method to supply a custom object factory function when using a custom allocator and/or constructor for your LexerUDF subclass. The object allocated by your factory function must persist util its close() method is called.
name | The name of your lexer function. The language customization configuration will use this name with the relative path to your installed plugin to indicate that your lexer function should be used. |
f | The object factory function with which to allocate objects of your LexerUDF class. |
|
inline |
Register a StemmerUDF implementation with MarkLogic Server.
This registration step gives MarkLogic Server a handle to an instance of your StemmerUDF subclass (T). Multiple instances may be constructed and stored in a pool for reuse.
Use this registration method to use the default object factory, which uses the default allocator and your StemmerUDF subclass default constructor.
name | The name of your stemmer function. The language customization configuration will use this name with the relative path to your installed plugin to indicate that your stemmer function should be used. |
|
pure virtual |
Register a StemmerUDF implementation with MarkLogic Server.
This registration step gives MarkLogic Server a handle to an instance of your StemmerUDF subclass (T). Multiple instances may be constructed and stored in a pool for reuse.
Use this registration method to supply a custom object factory function when using a custom allocator and/or constructor for your StemmerUDF subclass. The object allocated by your factory function must persist util its close() method is called.
name | The name of your stemmer function. The language customization configuration will use this name with the relative path to your installed plugin to indicate that your stemmer function should be used. |
f | The object factory function with which to allocate objects of your StemmerUDF class. |
void marklogic::Registry::version | ( | unsigned | pluginVersion = makeVersion(__DATE__, __TIME__) , |
unsigned | marklogicVersion = MARKLOGIC_API_VERSION |
||
) |
Register the version of your plugin library and the version of the MarkLogic Server Native Plugin API with which your plugin is compatible.
By default, a plugin version is created for you from DATE and TIME. This version is used to detect when the hosts in a MarkLogic Server cluster are out of synch with respect to your plugin.
You should not supply a value for the MarkLogic API version other than the default (MARKLOGIC_API_VERSION).
pluginVersion | The version of your plugin library. |
marklogicVersion | The version of the MarkLogic Server Native Plugin API against which your plugin is compiled. |