Copyright © (C) 2015, Jim Rosenblum
Behaviours: gen_server.
Authors: Jim Rosenblum (jrosenblum@carelogistics.com).
This gen_server is a singleton serializing access to the sequence table by which the cache provides support for serialized operations.
When the gen_server starts it tries to register itself using Global as jc_sequence. If not successful, it monitors the PID currently associated with jc_cluster. If that PID goes down, this gen_server tries to assign itself the global name.seq() = non_neg_integer() | -1
start_link/0 | Start the server and link the caller to it. |
test_set/2 | Ask the server to do the test_set: If NewSeq is >= to the existing sequence number for the Map, set the sequence to NewSeq and return true, else false. |
start_link() -> {ok, pid()} | ignore | {error, any()}
Start the server and link the caller to it.
test_set(Map::#{}, NewSeq::seq()) -> true | false
Ask the server to do the test_set: If NewSeq is >= to the existing sequence number for the Map, set the sequence to NewSeq and return true, else false.
Generated by EDoc, May 24 2016, 22:38:41.