Protected Attributes

unsigned

pluginVersion

Detailed Description

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:

extern"C"void marklogicPlugin(Registry& r)

{

r.version();

r.registerAggregate<MyFirstAggregate>("first");

r.registerAggregate("second", &mySecondAggregateFactory);

}

For more information, see "Registering a Native Plugin at Runtime" in the Application Developer's Guide.

Member Function Documentation

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.

Parameters

name

The name of your aggregate function. Applications will invoke your aggregate function using this name and the relative path to your installed plugin.

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.

Parameters

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.

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.

Parameters

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.

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.

Parameters

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).

Parameters

pluginVersion

The version of your plugin library.

marklogicVersion

The version of the MarkLogic Server Native Plugin API against which your plugin is compiled.

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