Adaptive Framework 0.9.0

journal

The following is a list of functions in the category journal

FunctionDescription
journal_advance_cursor_for_consumerUpdate the advance cursor for a consumer referenced by the consumerId parameter. The limit parameter specifies the maximum number of entries to scan for an applicable entry for consumer before returning. NULL is always returned. There are no response properties set by this function. The properties of the _AdaptiveProvisioningPeer_ object associated with the consumer_id are used in the following way: The consumerFilter expression is used to determine if an entry is applicable. Journal entries are scanned beginning at the entry at the cursor in the advanceCursor property. If the advanceCursor property is not present, the scan begins after the cursor in currentCursor. If neither are present, the scan begins at the start of the journal. If an new applicable entry is found or if the limit is met, the advanceCursor property is set to the currently scanned entry's cursor.
journal_get_by_cursorGet journal entry specified by entry_cursor parameter. This option will set response properties "entry" and "cursor" if there is an entry to retrieve. If an entry with the supplied cursor does not exist, a not_found error is thrown.
journal_get_firstGet first journal entry. This option will set response properties "entry" and "cursor" if there is a first entry to return.
journal_get_next_after_cursorGet the next journal entry after the one specified by the entry_cursor parameter. This option will set response properties "entry" and "cursor" if there is a next entry to retrieve.
journal_get_next_for_consumerGet the next journal entry for a consumer referenced by the consumer_id parameter. The entry_cursor parameter is ignored. The limit parameter specifies the maximum number of entries to scan for an applicable entry for consumer before returning. This option will set response properties "entry" and "entryCursor" if an applicable entry is retrieved. Property "reissue" will be set as described below. The properties of the _AdaptiveProvisioningPeer_ object associated with the consumer_id are used in the following way: The consumerFilter expression is used to determine if an entry is applicable. If consumeCursor property exists, return that entry at that cursor again immediately with a "reissue" property added and set to true. Journal entries are scanned beginning at the entry at the cursor in the advanceCursor property. If the advanceCursor property is not present, the scan begins after the cursor in currentCursor. If neither are present, the scan begins at the start of the journal. If an applicable entry is found, properties consumeStart and consumeCursor are set, advanceCursor is removed, and the entry is returned. Method mark_entry_consumed() will remove these properties. If no applicable entry is found, advanceCursor is set to the last entry scanned.
journal_get_next_for_consumer_after_cursorGet the next journal entry for a consumer referenced by the consumer_id after the one specified by the entry_cursor parameter. The limit parameter specifies the maximum number of entries to scan for an applicable entry for consumer before returning. This option will set response properties "entry" and "cursor" if an applicable entry is retrieved. The properties of the _AdaptiveProvisioningPeer_ object associated with the consumer_id are used in the following way: The consumerFilter expression is used to determine if an entry is applicable. Unlike option get_next_for_consumer, no other properties are referenced or modified.
journal_mark_consumedMark a journal entry returned by get_next_for_consumer() as consumed.