Module partisan_plumtree_backend

Behaviours: partisan_plumtree_broadcast_handler.

Data Types

broadcast_id()

broadcast_id() = timestamp()

broadcast_message()

broadcast_message() = #broadcast{}

broadcast_payload()

broadcast_payload() = timestamp()

timestamp()

timestamp() = non_neg_integer()

Function Index

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

Function Details

broadcast_data/1

broadcast_data(Broadcast::broadcast_message()) -> {broadcast_id(), broadcast_payload()}

Returns from the broadcast message the identifier and the payload.

exchange/1

exchange(Peer::node()) -> {ok, pid()}

Anti-entropy mechanism.

extract_log_type_and_payload/1

extract_log_type_and_payload(Message) -> any()

graft/1

graft(Timestamp::broadcast_id()) -> stale | {ok, broadcast_payload()} | {error, term()}

Given a message identifier and a clock, return a given message.

is_stale/1

is_stale(Timestamp::broadcast_id()) -> boolean()

Use the clock on the object to determine if this message is stale or not.

merge/2

merge(Timestamp::broadcast_id(), X2::broadcast_payload()) -> boolean()

Perform a merge of an incoming object with an object in the local datastore.

start_link/0

start_link() -> {ok, pid()} | ignore | {error, term()}

Same as start_link([]).

start_link/1

start_link(Opts::list()) -> {ok, pid()} | ignore | {error, term()}

Start and link to calling process.


Generated by EDoc