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_store< / 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_store< / 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 > The Machi write-once projection store service.
< h2 > < a name = "description" > Description< / a > < / h2 > < p > The Machi write-once projection store service.< / p >
< p > This API is gen_server-style message passing, intended for use
within a single Erlang node to glue together the projection store
server with the node-local process that implements Machi's TCP
client access protocol (on the "server side" of the TCP connection).< / p >
< p > All Machi client access to the projection store SHOULD NOT use this
module's API.< / p >
The projection store is implemented by an Erlang/OTP < code > gen_server< / code >
process that is associated with each FLU. Conceptually, the
projection store is an array of write-once registers. For each
projection store register, the key is a 2-tuple of an epoch number
(< code > non_neg_integer()< / code > type) and a projection type (< code > public< / code > or
< code > private< / code > type); the value is a projection data structure
(< code > projection_v1()< / code > type).
< h2 > < a name = "index" > Function Index< / a > < / h2 >
< table width = "100%" border = "1" cellspacing = "0" cellpadding = "2" summary = "function index" > < tr > < td valign = "top" > < a href = "#code_change-3" > code_change/3< / a > < / td > < td > < / td > < / tr >
< tr > < td valign = "top" > < a href = "#get_all_projections-2" > get_all_projections/2< / a > < / td > < td > Fetch all projection records of type < code > ProjType< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#get_all_projections-3" > get_all_projections/3< / a > < / td > < td > Fetch all projection records of type < code > ProjType< / code > .< / td > < / tr >
2015-05-20 02:14:55 +00:00
< tr > < td valign = "top" > < a href = "#get_latest_epochid-2" > get_latest_epochid/2< / a > < / td > < td > Fetch the latest epoch number + checksum for type < code > ProjType< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#get_latest_epochid-3" > get_latest_epochid/3< / a > < / td > < td > Fetch the latest epoch number + checksum for type < code > ProjType< / code > .< / td > < / tr >
2015-04-08 08:52:58 +00:00
< tr > < td valign = "top" > < a href = "#handle_call-3" > handle_call/3< / a > < / td > < td > < / td > < / tr >
< tr > < td valign = "top" > < a href = "#handle_cast-2" > handle_cast/2< / a > < / td > < td > < / td > < / tr >
< tr > < td valign = "top" > < a href = "#handle_info-2" > handle_info/2< / a > < / td > < td > < / td > < / tr >
< tr > < td valign = "top" > < a href = "#init-1" > init/1< / a > < / td > < td > < / td > < / tr >
< tr > < td valign = "top" > < a href = "#list_all_projections-2" > list_all_projections/2< / a > < / td > < td > Fetch all projection epoch numbers of type < code > ProjType< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#list_all_projections-3" > list_all_projections/3< / a > < / td > < td > Fetch all projection epoch numbers of type < code > ProjType< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#read-3" > read/3< / a > < / td > < td > Fetch the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#read-4" > read/4< / a > < / td > < td > Fetch the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#read_latest_projection-2" > read_latest_projection/2< / a > < / td > < td > Fetch the latest projection record for type < code > ProjType< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#read_latest_projection-3" > read_latest_projection/3< / a > < / td > < td > Fetch the latest projection record for type < code > ProjType< / code > .< / td > < / tr >
2015-05-20 02:14:55 +00:00
< tr > < td valign = "top" > < a href = "#set_wedge_notify_pid-2" > set_wedge_notify_pid/2< / a > < / td > < td > < / td > < / tr >
2015-04-08 08:52:58 +00:00
< tr > < td valign = "top" > < a href = "#start_link-3" > start_link/3< / a > < / td > < td > Start a new projection store server.< / td > < / tr >
< tr > < td valign = "top" > < a href = "#terminate-2" > terminate/2< / a > < / td > < td > < / td > < / tr >
< tr > < td valign = "top" > < a href = "#write-3" > write/3< / a > < / td > < td > Write the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / td > < / tr >
< tr > < td valign = "top" > < a href = "#write-4" > write/4< / a > < / td > < td > Write the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / td > < / tr >
< / table >
< h2 > < a name = "functions" > Function Details< / a > < / h2 >
< h3 class = "function" > < a name = "code_change-3" > code_change/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > code_change(OldVsn, S, Extra) -> any()< / tt > < / p >
< / div >
< h3 class = "function" > < a name = "get_all_projections-2" > get_all_projections/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > get_all_projections(PidSpec, ProjType) -> any()< / tt > < / p >
< / div > < p > Fetch all projection records of type < code > ProjType< / code > .< / p >
< h3 class = "function" > < a name = "get_all_projections-3" > get_all_projections/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > get_all_projections(PidSpec, ProjType, Timeout) -> any()< / tt > < / p >
< / div > < p > Fetch all projection records of type < code > ProjType< / code > .< / p >
2015-05-20 02:14:55 +00:00
< h3 class = "function" > < a name = "get_latest_epochid-2" > get_latest_epochid/2< / a > < / h3 >
2015-04-08 08:52:58 +00:00
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > get_latest_epochid(PidSpec, ProjType) -> any()< / tt > < / p >
2015-04-08 08:52:58 +00:00
< / div > < p > Fetch the latest epoch number + checksum for type < code > ProjType< / code > .< / p >
2015-05-20 02:14:55 +00:00
< h3 class = "function" > < a name = "get_latest_epochid-3" > get_latest_epochid/3< / a > < / h3 >
2015-04-08 08:52:58 +00:00
< div class = "spec" >
2015-05-20 02:14:55 +00:00
< p > < tt > get_latest_epochid(PidSpec, ProjType, Timeout) -> any()< / tt > < / p >
2015-04-08 08:52:58 +00:00
< / div > < p > Fetch the latest epoch number + checksum for type < code > ProjType< / code > .
projection.< / p >
< h3 class = "function" > < a name = "handle_call-3" > handle_call/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > handle_call(Request, From, S) -> any()< / tt > < / p >
< / div >
< h3 class = "function" > < a name = "handle_cast-2" > handle_cast/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > handle_cast(Msg, S) -> any()< / tt > < / p >
< / div >
< h3 class = "function" > < a name = "handle_info-2" > handle_info/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > handle_info(Info, S) -> any()< / tt > < / p >
< / div >
< h3 class = "function" > < a name = "init-1" > init/1< / a > < / h3 >
< div class = "spec" >
< p > < tt > init(X1) -> any()< / tt > < / p >
< / div >
< h3 class = "function" > < a name = "list_all_projections-2" > list_all_projections/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > list_all_projections(PidSpec, ProjType) -> any()< / tt > < / p >
< / div > < p > Fetch all projection epoch numbers of type < code > ProjType< / code > .< / p >
< h3 class = "function" > < a name = "list_all_projections-3" > list_all_projections/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > list_all_projections(PidSpec, ProjType, Timeout) -> any()< / tt > < / p >
< / div > < p > Fetch all projection epoch numbers of type < code > ProjType< / code > .< / p >
< h3 class = "function" > < a name = "read-3" > read/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > read(PidSpec, ProjType, Epoch) -> any()< / tt > < / p >
< / div > < p > Fetch the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / p >
< h3 class = "function" > < a name = "read-4" > read/4< / a > < / h3 >
< div class = "spec" >
< p > < tt > read(PidSpec, ProjType, Epoch, Timeout) -> any()< / tt > < / p >
< / div > < p > Fetch the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / p >
< h3 class = "function" > < a name = "read_latest_projection-2" > read_latest_projection/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > read_latest_projection(PidSpec, ProjType) -> any()< / tt > < / p >
< / div > < p > Fetch the latest projection record for type < code > ProjType< / code > .< / p >
< h3 class = "function" > < a name = "read_latest_projection-3" > read_latest_projection/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > read_latest_projection(PidSpec, ProjType, Timeout) -> any()< / tt > < / p >
< / div > < p > Fetch the latest projection record for type < code > ProjType< / code > .< / p >
2015-05-20 02:14:55 +00:00
< h3 class = "function" > < a name = "set_wedge_notify_pid-2" > set_wedge_notify_pid/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > set_wedge_notify_pid(PidSpec, NotifyWedgeStateChanges) -> any()< / tt > < / p >
< / div >
2015-04-08 08:52:58 +00:00
< h3 class = "function" > < a name = "start_link-3" > start_link/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > start_link(RegName, DataDir, NotifyWedgeStateChanges) -> any()< / tt > < / p >
< / div > < p > < p > Start a new projection store server.< / p >
The < code > DataDir< / code > argument should be the same directory as specified
for use by our companion FLU data server -- all file system paths
used by this server are intended to be stored underneath a common
file system parent directory as the FLU data server & sequencer
servers.< / p >
< h3 class = "function" > < a name = "terminate-2" > terminate/2< / a > < / h3 >
< div class = "spec" >
< p > < tt > terminate(Reason, S) -> any()< / tt > < / p >
< / div >
< h3 class = "function" > < a name = "write-3" > write/3< / a > < / h3 >
< div class = "spec" >
< p > < tt > write(PidSpec, ProjType, Proj) -> any()< / tt > < / p >
< / div > < p > Write the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / p >
< h3 class = "function" > < a name = "write-4" > write/4< / a > < / h3 >
< div class = "spec" >
< p > < tt > write(PidSpec, ProjType, Proj, Timeout) -> any()< / tt > < / p >
< / div > < p > Write the projection record type < code > ProjType< / code > for epoch number < code > Epoch< / code > .< / 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:51:25 +00:00
< p > < i > Generated by EDoc, May 20 2015, 12:50:53.< / i > < / p >
2015-04-08 08:52:58 +00:00
< / body >
< / html >