leo_mdcr_tbl_cluster_mgr

The multi-datacenter cluster manager talble’s operation.

References

Description

The multi-datacenter cluster manager talble’s operation

Function Index

all/0 Retrieve system configuration by cluster-id.
checksum/0 Retrieve a checksum.
create_table/2 Create a table of system-configutation.
delete/1 Remove system-configuration.
delete_by_node/1 Remove a node by a node-name.
get/1 Retrieve system configuration by cluster-id.
size/0 Retrieve the records.
synchronize/1 Synchronize records.
update/1 Modify system-configuration.

Function Details

all/0

all() -> {ok, [#cluster_manager{}]} | not_found | {error, any()}

Retrieve system configuration by cluster-id

checksum/0

checksum() -> {ok, integer()}

Retrieve a checksum

create_table/2

create_table(Mode, Node) -> ok | {error, any()}

  • Mode = mnesia_copies()
  • Node = [atom()]

Create a table of system-configutation

delete/1

delete(ClusterId) -> ok | {error, any()}

  • ClusterId = atom()

Remove system-configuration

delete_by_node/1

delete_by_node(Node) -> ok | not_found | {error, any()}

  • Node = atom()

Remove a node by a node-name

get/1

get(ClusterId) -> {ok, [#cluster_manager{}]} | not_found | {error, any()}

  • ClusterId = atom()

Retrieve system configuration by cluster-id

size/0

size() -> integer()

Retrieve the records

synchronize/1

synchronize(ValL) -> ok | {error, any()}

  • ValL = [#cluster_manager{}]

Synchronize records

update/1

update(ClusterMgr) -> ok | {error, any()}

  • ClusterMgr = #cluster_manager{}

Modify system-configuration