Module kpro_sent_reqs

This module manages an opaque collection of sent-requests.

Description

This module manages an opaque collection of sent-requests.

Data Types

corr_id()

corr_id() = kpro:corr_id()

requests()

abstract datatype: requests()

Function Index

add/5Add a new request to sent collection.
del/2Delete a request from the opaque collection.
get_corr_id/1Get the correction to be sent for the next request.
get_req/2Get caller of a request having the given correlation ID.
increment_corr_id/1Fetch and increment the correlation ID This is used if we don't want a response from the broker.
is_empty/1
new/0
scan_for_max_age/1Scan all sent requests to get oldest sent request.

Function Details

add/5

add(Requests::requests(), Caller::pid(), Ref::reference(), API::kpro:api(), Vsn::kpro:vsn()) -> {corr_id(), requests()}

Add a new request to sent collection. Return the last corrlation ID and the new collection.

del/2

del(Requests::requests(), CorrId::corr_id()) -> requests()

Delete a request from the opaque collection. Crash if correlation ID is not found.

get_corr_id/1

get_corr_id(Requests::requests()) -> corr_id()

Get the correction to be sent for the next request.

get_req/2

get_req(Requests::requests(), CorrId::corr_id()) -> {pid(), reference(), kpro:api(), kpro:vsn()}

Get caller of a request having the given correlation ID. Crash if the request is not found.

increment_corr_id/1

increment_corr_id(Requests::requests()) -> {corr_id(), requests()}

Fetch and increment the correlation ID This is used if we don't want a response from the broker

is_empty/1

is_empty(Requests::requests()) -> boolean()

new/0

new() -> requests()

scan_for_max_age/1

scan_for_max_age(Requests::requests()) -> timeout()

Scan all sent requests to get oldest sent request. Age is in milli-seconds. 0 is returned if there is no pending response.


Generated by EDoc