next up previous contents
Next: Records Up: Function calls and their Previous: Function calls and their   Contents

Session

DRMS_Session_t * drms_handle = drms_connect(char *DRMS_locator, char *user, char *passwd)
Called by the client to open a new socket to a running DRMS instance. The DRMS process spawns (and detaches?) a new thread which will pass database calls from the new client through to the Oracle database connection shared by all clients of the same DRMS instance. The string ``DRMS_locator'' is some TBD descriptor that specifies which DRMS instance to connect to and how. It could be of the form ``hostname:port''. If a connection cannot be established the drms_handle returned is NULL.
void drms_disconnect(DRMS_Session_t *drms_handle, int abort)
Called by the client to disconnect from DRMS. If abort is 1 the client issues an abort command to the DRMS instance which will roll back all changes made by clients in the current session. If abort is 0 then all data records created or modified by the client will be commited to the archive unless a subsequent module issues an abort.

int status = drms_commit(DRMS_Session_t *drms_handle)
Called by the client to force DRMS to commit the data records created so far in the session. DRMS will commit all records inserted into the database and tell SUMS to archive data units created so far. This call can be used for creating check-points in sessions.

void drms_abort(DRMS_Session_t *drms_handle)
drms_abort first calls drms_disconnect with abort=1 to discard all data records and storage units created in the current session. It then prints to stderr an error message containing the file and line number where the call to drms_abort occured, followed by a stack dump. Finally the program will be terminated with a non-zero exit code.


next up previous contents
Next: Records Up: Function calls and their Previous: Function calls and their   Contents
Philip Scherrer 2006-06-17