Copyright © 2008 Jacob Torrey
Authors: Jacob Torrey (torreyji@clarkson.edu).
| add_nodeinfo/3 | Adds Node to the node info metadata store. |
| add_replication_row/3 | Adds a row to the replication table. |
| create/8 | Creates a file in the metadata store. |
| file_exists/1 | Checks whether the Fid points to a valid file. |
| format/0 | Formats the Mnesia database and creates the tables. |
| get_fid/2 | Returns a filename's Fid. |
| get_nodes/1 | Returns a list of nodes which have an up to date version of Fid. |
| has_files/1 | Returns true if the replication table says that Node still has files. |
| ls/1 | Lists all files in a directory. |
| replicate/1 | Replicates the tables from the passed node to the current Mnesia database. |
| start/0 | Starts the Mnesia metadata store. |
| stop/0 | Stops the Mnesia metadata store. |
| try_delnodeinfo/1 | Tries to delete Node from the nodeinfo table in Mnesia. |
| try_replicate/1 | Tries to replicate as many of Node's files as possible. |
add_nodeinfo(Node::atom(), Totalspace::int(), Usedspace::int()) -> {atomic, Result} | {aborted, Reason}
Adds Node to the node info metadata store
add_replication_row(Node::atom(), Fid::int(), MD5::binary()) -> {atomic, Result} | {aborted, Reason}
Adds a row to the replication table
create(Filename::list(), Dir::atom(), Fid::int(), Owner::atom(), Group::atom(), Permissions::int(), Size::int(), MD5::binary()) -> {atomic, Result} | {aborted, Reason}
Creates a file in the metadata store
file_exists(Fid::int()) -> bool()
Checks whether the Fid points to a valid file
format() -> ok | {error, Reason}
Formats the Mnesia database and creates the tables
get_fid(Filename::atom(), Dir::atom()) -> int()
Returns a filename's Fid
get_nodes(Fid::int()) -> list()
Returns a list of nodes which have an up to date version of Fid
has_files(Node::atom()) -> bool()
Returns true if the replication table says that Node still has files
ls(Dir::atom()) -> list()
Lists all files in a directory
replicate(Node::atom()) -> ok | {timeout, BadTabList} | {error, Reason}
Replicates the tables from the passed node to the current Mnesia database
start() -> ok | {error, Reason}
Starts the Mnesia metadata store
stop() -> ok | {error, Reason}
Stops the Mnesia metadata store
try_delnodeinfo(Node::atom()) -> {atomic, Result} | {aborted, Reason}
Tries to delete Node from the nodeinfo table in Mnesia
try_replicate(Node::atom()) -> ok
Tries to replicate as many of Node's files as possible
Generated by EDoc, Mar 17 2008, 11:36:20.