View Source partisan_plumtree_backend (partisan v5.0.0-beta.13)

Link to this section Summary

Functions

Returns from the broadcast message the identifier and the payload.
Anti-entropy mechanism.
Given a message identifier and a clock, return a given message.
Use the clock on the object to determine if this message is stale or not.
Perform a merge of an incoming object with an object in the local datastore.
Same as start_link([]).
Start and link to calling process.

Link to this section Types

-type broadcast_id() :: timestamp().
-type broadcast_message() :: #broadcast{}.
-type broadcast_payload() :: timestamp().
-type timestamp() :: non_neg_integer().

Link to this section Functions

Link to this function

broadcast_data(Broadcast)

View Source
-spec broadcast_data(broadcast_message()) -> {broadcast_id(), broadcast_payload()}.
Returns from the broadcast message the identifier and the payload.
-spec exchange(node()) -> {ok, pid()}.
Anti-entropy mechanism.
Link to this function

extract_log_type_and_payload(Message)

View Source
-spec graft(broadcast_id()) -> stale | {ok, broadcast_payload()} | {error, term()}.
Given a message identifier and a clock, return a given message.
-spec is_stale(broadcast_id()) -> boolean().
Use the clock on the object to determine if this message is stale or not.
-spec merge(broadcast_id(), broadcast_payload()) -> boolean().
Perform a merge of an incoming object with an object in the local datastore.
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
Same as start_link([]).
-spec start_link(list()) -> {ok, pid()} | ignore | {error, term()}.
Start and link to calling process.