- meta-data database transactions

Functions to handle commit and rollback. More...

Functions

void commit_rename (string_ty *from, string_ty *to)
void commit_rename (const nstring &from, const nstring &to)
void commit_symlink (string_ty *from, string_ty *to)
void commit_symlink (const nstring &from, const nstring &to)
void commit_hard_link (string_ty *from, string_ty *to)
void commit_hard_link (const nstring &from, const nstring &to)
void commit_unlink_errok (string_ty *path)
void commit_unlink_errok (const nstring &path)
void commit_rmdir_errok (string_ty *path)
void commit_rmdir_errok (const nstring &path)
void commit_rmdir_tree_bg (string_ty *path)
void commit_rmdir_tree_bg (const nstring &path)
void commit_rmdir_tree_errok (string_ty *path)
void commit_rmdir_tree_errok (const nstring &path)
void commit (void)
void undo_rename (string_ty *from, string_ty *to)
void undo_rename (const nstring &from, const nstring &to)
void undo_rename_cancel (string_ty *from, string_ty *to)
void undo_rename_cancel (const nstring &from, const nstring &to)
void undo_chmod (string_ty *path, int mode)
void undo_chmod (const nstring &path, int mode)
void undo_chmod_errok (string_ty *path, int mode)
void undo_chmod_errok (const nstring &path, int mode)
void undo_unlink_errok (string_ty *path)
void undo_unlink_errok (const nstring &path)
void undo_rmdir_bg (string_ty *path)
void undo_rmdir_bg (const nstring &path)
void undo_rmdir_errok (string_ty *path)
void undo_rmdir_errok (const nstring &path)
void undo_message (string_ty *msg)
void undo_message (const nstring &msg)
void undo (void)
void undo_cancel (void)

Variables

quit_action_undo undo_quitter

Detailed Description

Functions to handle commit and rollback.

Aegis implements transactions defining two operation queues, one is used to store operations to be run at commit time and the other is used to store operations to be run at rollback time.

Operations to be run at commit time must be requested calling commit_* functions, while operations to be run at rollback time must be requested with undo_* functions.

Note that operation requested with commit_/undo_ functions are not executed immediatly but are delayed until the proper event (commit or undo) is issued. Also note that it is possible that the operation you request (e.g. commit_rename) will not be executed because an undo event is triggered, the same holds for undo_ operation.


Function Documentation

void commit ( void   ) 

The commit function is used to perform all the actions queued using the commit_* functions.

After it has completed successfully, further calls to commit() will be NOPs, until new commit_* functions are used.

When the commit has succeeded, the undo list is cancelled, since there is now no reason to undo anything.

void commit_hard_link ( const nstring from,
const nstring to 
)

The commit_hard_link function is used to submit a commit request to hard link a file at commit (success) time.

Parameters:
from path of file now
to path of hard link to create at commit time.

void commit_hard_link ( string_ty from,
string_ty to 
)

The commit_hard_link function is used to submit a commit request to hard link a file at commit (success) time.

Parameters:
from path of file now
to path of hard link to create at commit time.

void commit_rename ( const nstring from,
const nstring to 
)

The commit_rename function is used to submit a commit request to rename a file.

Parameters:
from path of file now
to path of file after commit

void commit_rename ( string_ty from,
string_ty to 
)

The commit_rename function is used to submit a commit request to rename a file.

Parameters:
from path of file now
to path of file after commit

void commit_rmdir_errok ( const nstring path  ) 

The commit_rmdir_errok function is used to delete an empty directory on commit. It will not be an error if the directory does not exist. It will not be an error if the directory is not empty.

Parameters:
path path of directory to be deleted

void commit_rmdir_errok ( string_ty path  ) 

The commit_rmdir_errok function is used to delete an empty directory on commit. It will not be an error if the directory does not exist. It will not be an error if the directory is not empty.

Parameters:
path path of directory to be deleted

void commit_rmdir_tree_bg ( const nstring path  ) 

The commit_rmdir_tree_bg function is used to delete a directory tree on commit. It will not be an error if the directory does not exist. It will not be an error if the directory, or any subtree, is not empty.

Parameters:
path path of directory to be deleted

void commit_rmdir_tree_bg ( string_ty path  ) 

The commit_rmdir_tree_bg function is used to delete a directory tree on commit. It will not be an error if the directory does not exist. It will not be an error if the directory, or any subtree, is not empty.

Parameters:
path path of directory to be deleted

void commit_rmdir_tree_errok ( const nstring path  ) 

The commit_rmdir_tree_errok function is used to delete a directory tree on commit. It will not be an error if the directory does not exist. It will not be an error if the directory, or any subtree, is not empty.

Parameters:
path path of directory to be deleted

void commit_rmdir_tree_errok ( string_ty path  ) 

The commit_rmdir_tree_errok function is used to delete a directory tree on commit. It will not be an error if the directory does not exist. It will not be an error if the directory, or any subtree, is not empty.

Parameters:
path path of directory to be deleted

void commit_symlink ( const nstring from,
const nstring to 
)

The commit_symlink function is used to submit a commit request to symlink a file at commit (success) time.

Parameters:
from path of file now
to path of symlink to create at commit time.

void commit_symlink ( string_ty from,
string_ty to 
)

The commit_symlink function is used to submit a commit request to symlink a file at commit (success) time.

Parameters:
from path of file now
to path of symlink to create at commit time.

void commit_unlink_errok ( const nstring path  ) 

The commit_unlink_errok function is used to unlink a file on commit. It will not be an error if the file does not exist.

Parameters:
path path of file to be unlinked

void commit_unlink_errok ( string_ty path  ) 

The commit_unlink_errok function is used to unlink a file on commit. It will not be an error if the file does not exist.

Parameters:
path path of file to be unlinked

void undo ( void   ) 

The undo function is used to pun all pending operation in the undo queue.

void undo_cancel ( void   ) 

The undo_cancel function is used to cancel any pending operation from the undo queue.

void undo_chmod ( const nstring path,
int  mode 
)

The undo_chmod function is used to put a chmod operation in the undo queue.

Parameters:
path The path to have its mode changed.
mode The mod to change the path to.

void undo_chmod ( string_ty path,
int  mode 
)

The undo_chmod function is used to put a chmod operation in the undo queue.

Parameters:
path The path to have its mode changed.
mode The mod to change the path to.

void undo_chmod_errok ( const nstring path,
int  mode 
)

The undo_chmod_errok function is used to put a chmod operation in the undo queue. Errors are ignored.

Parameters:
path The path to have its mode changed.
mode The mod to change the path to.

void undo_chmod_errok ( string_ty path,
int  mode 
)

The undo_chmod function is used to put a chmod operation in the undo queue. Errors are ignored.

Parameters:
path The path to have its mode changed.
mode The mod to change the path to.

void undo_message ( const nstring msg  ) 

The undo_message function is used to print a message in the event of failure.

Parameters:
msg The message to be printed.

void undo_message ( string_ty msg  ) 

The undo_message function is used to print a message in the event of failure.

Parameters:
msg The message to be printed.

void undo_rename ( const nstring from,
const nstring to 
)

The undo_rename funtion is used to submit an undo request (rollback) to rename a file.

Parameters:
from path of file now
to path of file after rollback.

void undo_rename ( string_ty from,
string_ty to 
)

The undo_rename funtion is used to submit an undo request (rollback) to rename a file.

Parameters:
from path of file now
to path of file after rollback.

void undo_rename_cancel ( const nstring from,
const nstring to 
)

The undo_rename_cancel function is used to cancel an undo request submitted with undo_rename().

Parameters:
from path of file now
to path of file_after rollback.

void undo_rename_cancel ( string_ty from,
string_ty to 
)

The undo_rename_cancel function is used to cancel an undo request submitted with undo_rename().

Parameters:
from path of file now
to path of file_after rollback.

void undo_rmdir_bg ( const nstring path  ) 

The undo_rmdir_bg function is used to put a rmdir (recursive directory remove) operation in the undo queue. The operation is performed in the background.

Parameters:
path The path of the directory to be removed.

void undo_rmdir_bg ( string_ty path  ) 

The undo_rmdir_bg function is used to put a rmdir (recursive directory remove) operation in the undo queue. The operation is performed in the background.

Parameters:
path The path of the directory to be removed.

void undo_rmdir_errok ( const nstring path  ) 

The undo_rmdir_errok function is used to put a rmdir (non-recursive) operation in the undo queue. Any error (e.g. directory not empty) will be ignored.

Parameters:
path The path of the directory to be removed.

void undo_rmdir_errok ( string_ty path  ) 

The undo_rmdir_errok function is used to put a rmdir (non-recursive) operation in the undo queue. Any error (e.g. directory not empty) will be ignored.

Parameters:
path The path of the directory to be removed.

void undo_unlink_errok ( const nstring path  ) 

The undo_unlink_errok function si sued to put an unlink operation in the undo queue.

Parameters:
path The path opf the file to be removed.

void undo_unlink_errok ( string_ty path  ) 

The undo_unlink_errok function si sued to put an unlink operation in the undo queue.

Parameters:
path The path opf the file to be removed.


Variable Documentation


Generated on Wed Mar 12 23:37:38 2008 for Aegis by  doxygen 1.5.5