Tcl calls into the server-side Rover library

Database functions

Rover_DbOpenWrite // Rover_DbOpenRead // Rover_DbReopenWrite // Rover_DbReopenRead // Rover_DbClose // Rover_DbDelete // Rover_GetAccessTime // Rover_SetAccessTime

Log manipulation functions

Rover_AddLog // Rover_outstrLSuffix

Output funcitons

Rover_CTime // Rover_Escape // Rover_TclEscape // Rover_Unescape // Rover_emitData // Rover_emitLog // Rover_escaped_outstrC // Rover_escaped_outstrD // Rover_escaped_outstrL // Rover_no_cache // Rover_outstrC // Rover_outstrD // Rover_outstrInit // Rover_outstrL

Fault-tolerant RDO functions Rover_setRecoveryProc // Rover_stable

Obsolete (Do not use)

Rover_tailLog // Rover_updateLog



Database Functions

These database functions are Tcl wrappers for the server C database functions. These functions are simplified by implicitly referring to the global Database structure currdb. Thus, only one database at a time may be manipulated.


Rover_DbOpenWrite filename [mode]

Opens current database for writing. Assumes no database builder.

Returns TCL_OK.


Rover_DbOpenRead filename [mode]

Opens current database for reading. Assumes no database builder.

Returns TCL_OK.


Rover_DbRepenWrite

Reopens current database in write mode.

Returns TCL_OK.


Rover_DbRepenRead

Reopens current database in read mode.

Returns TCL_OK.


Rover_DbClose

Closes current database.

Returns TCL_OK.


Rover_DbDelete obj

Deletes an object from the database.

Returns the return code from deleting the object. The return code is 0 if the object was successfully deleted. A return code of -1 indicates that the object was not present or the requester is a reader.


Rover_GetAccessTime obj

Returns the access time for an object in the database.

Returns the access time for the object, or 0 if the the object is not found in the database.


Rover_SetAccessTime obj time

Set the access time for an object in the database.

Returns TCL_OK.



Log Manipulation Functions

These functions are Tcl wrappers for the server C log manipulation functions. All the following functions manipulate the operation log for a particular object.


Rover_AddLog obj time status operation

Adds an operation to an object's log.

Returns TCL_OK.

Rover_outstrLSuffix obj stamp

Inserts the suffix of an object's log into the log suffix segment of the output buffer (the buffer must be in log suffix segment mode or an errorExit will occur). The operation is not escaped.

Returns TCL_OK.



Output Functions

These functions are Tcl wrappers for the server C-based output functions. All the following functions manipulate strings for output. Many manipulate the global output buffer. object.


Rover_CTime time

Similar to the C library function ctime, converts an integer time into it's ASCII representation (e.g., "Wed Jun 30 21:49:08 1993"). Differs in that it strips the trailing newline.

Returns the ASCII representation of time.


Rover_Escape string

Escapes a URL for transmission by substituting a '%' followed by a two digit hexadecimal code for any characters that cannot be transmitted raw. This table lists the characters that are escaped. The inverse function is Rover_Unescape.

Returns the escaped string.


Rover_TclEscape string

Escapes a string for use as an argument to a TCL procedure by inserting a \ before any special TCL (or shell) characters. This table lists the characters that are escaped.

Returns the escaped string.


Rover_Unescape string

Unescapes an escaped URL, substituting the equivalent ASCII character for three-character `%XX' hexadecimal sequences. This reverses the escaping performed by Rover_Escape This table lists the affected characters.

Returns the unescaped string.


Rover_emitData

Begins a data segment in the output buffer. The buffer previously must have been in the code segment mode, otherwise an errorExit will occur.

Returns TCL_OK.


Rover_emitLog

Begins a log suffix segment in the output buffer. The buffer previously must have been in the code or data segment modes, otherwise an errorExit will occur.

Returns TCL_OK.


Rover_escaped_outstrC [arg1 ... argn]

Invokes Rover_TclEscape on each of the arguments and outputs the results to the code segment of the output buffer (the buffer must be in code segment mode or an errorExit will occur). This table lists the affected characters.

Returns TCL_OK.


Rover_escaped_outstrD [arg1 ... argn]

Invokes Rover_TclEscape on each of the arguments and outputs the results to the data segment of the output buffer (the buffer must be in data segment mode or an errorExit will occur). This table lists the affected characters.

Returns TCL_OK.


Rover_escaped_outstrL host logID status operation

Invokes Rover_TclEscape on the operation argument, generates a log suffix record, and inserts the record into the log suffix segment of the output buffer (the buffer must be in log suffix segment mode or an errorExit will occur). This table lists the affected characters.

Returns TCL_OK.


Rover_no_cache

Marks the object being created as not cacheable. This table lists the possible cache tags for objects.

Returns TCL_OK.


Rover_outstrC [arg1 ... argn]

Outputs the arguments to the code segment of the output buffer (the buffer must be in code segment mode or an errorExit will occur).

Returns TCL_OK.


Rover_outstrD [arg1 ... argn]

Outputs the arguments to the data segment of the output buffer (the buffer must be in data segment mode or an errorExit will occur).

Returns TCL_OK.


Rover_outstrInit [size]

Initialize the output buffer and all related variables. If size is specified, the buffer will be at least size bytes in size. Otherwise, the buffer will be initialized to a default size.

Returns TCL_OK.


Rover_outstrL host logID status operation

Generates a log suffix record and inserts the record into the log suffix segment of the output buffer (the buffer must be in log suffix segment mode or an errorExit will occur). The operation is not escaped.

Returns TCL_OK.



Fault-Tolerant RDO Functions

These functions are Tcl wrappers for the Standalone Daemon server's procedures for implementing fault-tolerant RDOs. These procedures can be used to create long-running RDOs that will survive (reasonable) failures of the server process or machine.


Rover_setRecoveryProc procedure

Sets the failure recovery procedure for the currently running request to procedure and logs the information to a stable log. Upon restart after a server failure, the procedure will be invoked to restart/continue the request.

Returns TCL_OK.


Rover_stable variable [value]

Creates a stable variable named, variable, and sets its initial value to value, if supplied. All changes to the stable variable are logged to a stable log. The variable must be a global Tcl variable. Note: There is a 256 character limit on variable names.

Returns TCL_OK.


Rover_tailLog logFile indexFile dvtime

Obsolete. May be deleted at any time. Do not use.


Rover_updateLog logFile indexFile dvtime operation

Obsolete. May be deleted at any time. Do not use.


Last updated by $Author: adj $ on $Date: 1997/12/02 19:44:30 $.
Copyright © 1995-1998 Anthony D. Joseph and Massachusetts Institute of Technology