Behaviours: ra_machine.
command() = #put{key = key(), value = term(), meta = #{size := non_neg_integer(), hash := integer()}} | #delete{key = key()}
key() = binary()
abstract datatype: state()
value() = term()
| add_member/3 | |
| apply/3 | |
| delete/3 | |
| get/3 | get performs a consistent query that returns the index, hash and member set then perform an aux query to actually get the data for a given index. |
| handle_aux/5 | |
| init/1 | |
| init_aux/1 | |
| live_indexes/1 | |
| member_overview/1 | |
| overview/1 | |
| put/4 | |
| read_entry/4 | |
| remove_member/3 | |
| start_cluster/3 | |
| take_snapshot/1 |
add_member(System::atom(), NewMemberId::ra_server_id(), LeaderId::ra_server_id()) -> ok | {error, term()} | {timeout, ra_server_id()}
apply(Meta, Put, State0) -> any()
delete(ServerId::ra:server_id(), Key::key(), Timeout::non_neg_integer()) -> {ok, map()} | {error, not_found} | {error, term()} | {timeout, ra:server_id()}
get(ServerId::ra:server_id(), Key::key(), Timeout::non_neg_integer()) -> {ok, map(), value()} | {error, term()} | {timeout, ra:server_id()}
get performs a consistent query that returns the index, hash and member set then perform an aux query to actually get the data for a given index. if addressing a follower (say there is a local one) then the read may need to wait if the index isn't yet available locally (term also need to be checked) or check that the machien state has the right index for a given key before reading the value from the log
handle_aux(RaState, X2, X3, Aux, Internal) -> any()
init(X1) -> any()
init_aux(X1) -> any()
live_indexes(X1) -> any()
member_overview(ServerId) -> any()
overview(State) -> any()
put(ServerId::ra:server_id(), Key::key(), Value::value(), Timeout::non_neg_integer()) -> {ok, map()} | {error, term()} | {timeout, ra:server_id()}
read_entry(ServerId, Idx, Members, Timeout) -> any()
remove_member(System::atom(), NewMemberId::ra_server_id(), LeaderId::ra_server_id()) -> ok | {error, term()} | {timeout, ra_server_id()}
start_cluster(System::atom(), ClusterName::atom(), Config::#{members := [ra_server_id()]}) -> {ok, [ra_server_id()], [ra_server_id()]} | {error, cluster_not_formed}
take_snapshot(ServerId::ra_server_id()) -> ok
Generated by EDoc