annotate_batch

March 26, 2020 Contributors

Name

annotate_batch — Allow a module to assume responsibility for batch annotation

Synopsis

#include "hooks/core/annotate_batch.h"

| int **core_annotate_batch** ( | closure, |   |
|   | head); |   |

void * <var class="pdparam">closure</var>;
sp_async_message * <var class="pdparam">head</var>;

Description

This hook allows a module to assume responsibility for batch annotation. Add the custom annotation to the message context of each message in the batch. When using this hook you must also use the assess_batch hook to read this custom annotation.

Parameters

closure

A pointer to the closure function.

head

This parameter is the sp_async_message head pointer that contains the whole batch. For a description of this data type see sp_async_message.

Return Values

If this hook returns 1, then the standard batch annotation is not performed and no other implementations of this hook are called.

Threading

This hook will be called in the Scheduler thread.

See Also

“ec_message” and assess_batch