2015-04-08 08:52:58 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" >
< title > Module machi_projection< / title >
< link rel = "stylesheet" type = "text/css" href = "stylesheet.css" title = "EDoc" >
< / head >
< body bgcolor = "white" >
< div class = "navbar" > < a name = "#navbar_top" > < / a > < table width = "100%" border = "0" cellspacing = "0" cellpadding = "2" summary = "navigation bar" > < tr > < td > < a href = "overview-summary.html" target = "overviewFrame" > Overview< / a > < / td > < td > < a href = "http://www.erlang.org/" > < img src = "erlang.png" align = "right" border = "0" alt = "erlang logo" > < / a > < / td > < / tr > < / table > < / div >
< hr >
< h1 > Module machi_projection< / h1 >
< ul class = "index" > < li > < a href = "#description" > Description< / a > < / li > < li > < a href = "#index" > Function Index< / a > < / li > < li > < a href = "#functions" > Function Details< / a > < / li > < / ul > API for manipulating Machi projection data structures (i.e., records).
< h2 > < a name = "description" > Description< / a > < / h2 > API for manipulating Machi projection data structures (i.e., records).
< h2 > < a name = "index" > Function Index< / a > < / h2 >
2015-05-20 02:14:55 +00:00
< table width = "100%" border = "1" cellspacing = "0" cellpadding = "2" summary = "function index" > < tr > < td valign = "top" > < a href = "#compare-2" > compare/2< / a > < / td > < td > Compare two projection records for equality (assuming that the
checksum element has been correctly calculated).< / td > < / tr >
< tr > < td valign = "top" > < a href = "#make_members_dict-1" > make_members_dict/1< / a > < / td > < td > Make a < code > p_srvr_dict()< / code > out of a list of < code > p_srvr()< / code > or out of a
< code > p_srvr_dict()< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#make_summary-1" > make_summary/1< / a > < / td > < td > Create a proplist-style summary of a projection record.< / td > < / tr >
2015-04-08 08:52:58 +00:00
< tr > < td valign = "top" > < a href = "#new-6" > new/6< / a > < / td > < td > Create a new projection record.< / td > < / tr >
< tr > < td valign = "top" > < a href = "#new-7" > new/7< / a > < / td > < td > Create a new projection record.< / td > < / tr >
< tr > < td valign = "top" > < a href = "#new-8" > new/8< / a > < / td > < td > Create a new projection record.< / td > < / tr >
2015-05-20 02:14:55 +00:00
< tr > < td valign = "top" > < a href = "#update_checksum-1" > update_checksum/1< / a > < / td > < td > Update the checksum element of a projection record.< / td > < / tr >
< tr > < td valign = "top" > < a href = "#update_dbg2-2" > update_dbg2/2< / a > < / td > < td > Update the < code > dbg2< / code > element of a projection record.< / td > < / tr >
2015-04-08 08:52:58 +00:00
< / table >
< h2 > < a name = "functions" > Function Details< / a > < / h2 >
< h3 class = "function" > < a name = "compare-2" > compare/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > compare(Projection_v1::#projection_v1{}, Projection_v1::#projection_v1{}) -> integer()< / tt > < br > < / p >
2015-05-20 02:14:55 +00:00
< / div > < p > < p > Compare two projection records for equality (assuming that the
checksum element has been correctly calculated).< / p >
The name "compare" is probably too close to "rank"? This
comparison has nothing to do with projection ranking.< / p >
2015-04-08 08:52:58 +00:00
2015-05-20 02:14:55 +00:00
< h3 class = "function" > < a name = "make_members_dict-1" > make_members_dict/1< / a > < / h3 >
2015-04-08 08:52:58 +00:00
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > make_members_dict(Ps::[< a href = "#type-p_srvr" > p_srvr()< / a > ] | < a href = "#type-p_srvr_dict" > p_srvr_dict()< / a > ) -> < a href = "#type-p_srvr_dict" > p_srvr_dict()< / a > < / tt > < br > < / p >
< / div > < p > < p > Make a < code > p_srvr_dict()< / code > out of a list of < code > p_srvr()< / code > or out of a
< code > p_srvr_dict()< / code > .< / p >
< p > If < code > Ps< / code > is a < code > p_srvr_dict()< / code > , 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 < code > orddict< / code > can work
correctly.< / p >
If < code > Ps< / code > is simply < code > list(p_srvr())< / code > , in which case we'll convert it
to a < code > p_srvr_dict()< / code > .< / p >
< h3 class = "function" > < a name = "make_summary-1" > make_summary/1< / a > < / h3 >
< div class = "spec" >
< p > < tt > make_summary(Projection_v1) -> any()< / tt > < / p >
2015-04-08 08:52:58 +00:00
< / div > < p > Create a proplist-style summary of a projection record.< / p >
< h3 class = "function" > < a name = "new-6" > new/6< / a > < / h3 >
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > new(MyName, MemberDict, UPI_list, Down_list, Repairing_list, Ps) -> any()< / tt > < / p >
2015-04-08 08:52:58 +00:00
< / div > < p > Create a new projection record.< / p >
< h3 class = "function" > < a name = "new-7" > new/7< / a > < / h3 >
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > new(EpochNum, MyName, MemberDict, Down_list, UPI_list, Repairing_list, Dbg) -> any()< / tt > < / p >
2015-04-08 08:52:58 +00:00
< / div > < p > Create a new projection record.< / p >
< h3 class = "function" > < a name = "new-8" > new/8< / a > < / h3 >
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > new(EpochNum, MyName, MembersDict0, Down_list, UPI_list, Repairing_list, Dbg, Dbg2) -> any()< / tt > < / p >
< / div > < p > < p > Create a new projection record.< / p >
The < code > MemberDict0< / code > argument may be a true < code > p_srvr_dict()< / code > (i.e, it
is a well-formed < code > orddict< / code > with the correct 2-tuple key-value form)
or it may be simply < code > list(p_srvr())< / code > , in which case we'll convert it
to a < code > p_srvr_dict()< / code > .< / p >
2015-04-08 08:52:58 +00:00
2015-05-20 02:14:55 +00:00
< h3 class = "function" > < a name = "update_checksum-1" > update_checksum/1< / a > < / h3 >
2015-04-08 08:52:58 +00:00
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > update_checksum(P) -> any()< / tt > < / p >
2015-04-08 08:52:58 +00:00
< / div > < p > Update the checksum element of a projection record.< / p >
2015-05-20 02:14:55 +00:00
< h3 class = "function" > < a name = "update_dbg2-2" > update_dbg2/2< / a > < / h3 >
2015-04-08 08:52:58 +00:00
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > update_dbg2(P, Dbg2) -> any()< / tt > < / p >
2015-04-08 08:52:58 +00:00
< / div > < p > Update the < code > dbg2< / code > element of a projection record.< / p >
< hr >
< div class = "navbar" > < a name = "#navbar_bottom" > < / a > < table width = "100%" border = "0" cellspacing = "0" cellpadding = "2" summary = "navigation bar" > < tr > < td > < a href = "overview-summary.html" target = "overviewFrame" > Overview< / a > < / td > < td > < a href = "http://www.erlang.org/" > < img src = "erlang.png" align = "right" border = "0" alt = "erlang logo" > < / a > < / td > < / tr > < / table > < / div >
2015-05-20 03:58:44 +00:00
< p > < i > Generated by EDoc, May 20 2015, 12:58:33.< / i > < / p >
2015-04-08 08:52:58 +00:00
< / body >
< / html >