Module machi_projection_store

The Machi write-once projection store service.

Description

The Machi write-once projection store service.

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).

All Machi client access to the projection store SHOULD NOT use this module's API.

The projection store is implemented by an Erlang/OTP gen_server 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 (non_neg_integer() type) and a projection type (public or private type); the value is a projection data structure (projection_v1() type).

Function Index

code_change/3
get_all_projections/2Fetch all projection records of type ProjType.
get_all_projections/3Fetch all projection records of type ProjType.
get_latest_epochid/2Fetch the latest epoch number + checksum for type ProjType.
get_latest_epochid/3Fetch the latest epoch number + checksum for type ProjType.
handle_call/3
handle_cast/2
handle_info/2
init/1
list_all_projections/2Fetch all projection epoch numbers of type ProjType.
list_all_projections/3Fetch all projection epoch numbers of type ProjType.
read/3Fetch the projection record type ProjType for epoch number Epoch .
read/4Fetch the projection record type ProjType for epoch number Epoch .
read_latest_projection/2Fetch the latest projection record for type ProjType.
read_latest_projection/3Fetch the latest projection record for type ProjType.
set_wedge_notify_pid/2
start_link/3Start a new projection store server.
terminate/2
write/3Write the projection record type ProjType for epoch number Epoch .
write/4Write the projection record type ProjType for epoch number Epoch .

Function Details

code_change/3

code_change(OldVsn, S, Extra) -> any()

get_all_projections/2

get_all_projections(PidSpec, ProjType) -> any()

Fetch all projection records of type ProjType.

get_all_projections/3

get_all_projections(PidSpec, ProjType, Timeout) -> any()

Fetch all projection records of type ProjType.

get_latest_epochid/2

get_latest_epochid(PidSpec, ProjType) -> any()

Fetch the latest epoch number + checksum for type ProjType.

get_latest_epochid/3

get_latest_epochid(PidSpec, ProjType, Timeout) -> any()

Fetch the latest epoch number + checksum for type ProjType. projection.

handle_call/3

handle_call(Request, From, S) -> any()

handle_cast/2

handle_cast(Msg, S) -> any()

handle_info/2

handle_info(Info, S) -> any()

init/1

init(X1) -> any()

list_all_projections/2

list_all_projections(PidSpec, ProjType) -> any()

Fetch all projection epoch numbers of type ProjType.

list_all_projections/3

list_all_projections(PidSpec, ProjType, Timeout) -> any()

Fetch all projection epoch numbers of type ProjType.

read/3

read(PidSpec, ProjType, Epoch) -> any()

Fetch the projection record type ProjType for epoch number Epoch .

read/4

read(PidSpec, ProjType, Epoch, Timeout) -> any()

Fetch the projection record type ProjType for epoch number Epoch .

read_latest_projection/2

read_latest_projection(PidSpec, ProjType) -> any()

Fetch the latest projection record for type ProjType.

read_latest_projection/3

read_latest_projection(PidSpec, ProjType, Timeout) -> any()

Fetch the latest projection record for type ProjType.

set_wedge_notify_pid/2

set_wedge_notify_pid(PidSpec, NotifyWedgeStateChanges) -> any()

start_link/3

start_link(RegName, DataDir, NotifyWedgeStateChanges) -> any()

Start a new projection store server.

The DataDir 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.

terminate/2

terminate(Reason, S) -> any()

write/3

write(PidSpec, ProjType, Proj) -> any()

Write the projection record type ProjType for epoch number Epoch .

write/4

write(PidSpec, ProjType, Proj, Timeout) -> any()

Write the projection record type ProjType for epoch number Epoch .


Generated by EDoc, May 20 2015, 11:11:34.