Module machi_projection

API for manipulating Machi projection data structures (i.e., records).

Description

API for manipulating Machi projection data structures (i.e., records).

Function Index

compare/2Compare two projection records for equality (assuming that the checksum element has been correctly calculated).
make_members_dict/1Make a p_srvr_dict() out of a list of p_srvr() or out of a p_srvr_dict().
make_summary/1Create a proplist-style summary of a projection record.
new/6Create a new projection record.
new/7Create a new projection record.
new/8Create a new projection record.
update_checksum/1Update the checksum element of a projection record.
update_dbg2/2Update the dbg2 element of a projection record.

Function Details

compare/2

compare(Projection_v1::#projection_v1{}, Projection_v1::#projection_v1{}) -> integer()

Compare two projection records for equality (assuming that the checksum element has been correctly calculated).

The name "compare" is probably too close to "rank"? This comparison has nothing to do with projection ranking.

make_members_dict/1

make_members_dict(Ps::[p_srvr()] | p_srvr_dict()) -> p_srvr_dict()

Make a p_srvr_dict() out of a list of p_srvr() or out of a p_srvr_dict().

If Ps is a p_srvr_dict(), then this function is usually a no-op. However, if someone has tampered with the list and screwed up its order, then we should fix it so orddict can work correctly.

If Ps is simply list(p_srvr()), in which case we'll convert it to a p_srvr_dict().

make_summary/1

make_summary(Projection_v1) -> any()

Create a proplist-style summary of a projection record.

new/6

new(MyName, MemberDict, UPI_list, Down_list, Repairing_list, Ps) -> any()

Create a new projection record.

new/7

new(EpochNum, MyName, MemberDict, Down_list, UPI_list, Repairing_list, Dbg) -> any()

Create a new projection record.

new/8

new(EpochNum, MyName, MembersDict0, Down_list, UPI_list, Repairing_list, Dbg, Dbg2) -> any()

Create a new projection record.

The MemberDict0 argument may be a true p_srvr_dict() (i.e, it is a well-formed orddict with the correct 2-tuple key-value form) or it may be simply list(p_srvr()), in which case we'll convert it to a p_srvr_dict().

update_checksum/1

update_checksum(P) -> any()

Update the checksum element of a projection record.

update_dbg2/2

update_dbg2(P, Dbg2) -> any()

Update the dbg2 element of a projection record.


Generated by EDoc, May 20 2015, 12:36:35.